Streaming Tools
What Changed?
Section titled “What Changed?”In v3.x, there were 3 separate streaming tools. In v4.0.0, their logic is embedded into the primary tools:
| v3 Tool (removed) | v4 Replacement | Notes |
|---|---|---|
streaming_write_file | mcp_write | Auto-streams when content > 50KB |
chunked_read_file | mcp_read | Auto-chunks when file > 50KB |
smart_edit_file | mcp_edit | Auto line-by-line for large files |
How It Works Now
Section titled “How It Works Now”You don’t need to choose between streaming and non-streaming tools. The mcp_* tools automatically detect file size and select the optimal strategy:
- Small files (< 100KB): Direct I/O — fastest possible
- Large files (> 100KB): Streaming I/O — prevents timeouts
Example
Section titled “Example”// This AUTOMATICALLY streams for large content:mcp_write({ path: "report.json", content: largeJsonData })// Progress: 20%... 50%... 75%... 100%// Complete in 8 seconds
// This AUTOMATICALLY chunks for large files:mcp_read({ path: "huge_log.txt" })// Reads in 64KB chunks internally
// This AUTOMATICALLY uses line-by-line for large files:mcp_edit({ path: "config.xml", old_text: "old", new_text: "new" })// Processes line by line, never loads entire filePerformance
Section titled “Performance”| File Size | v3 (manual selection needed) | v4 (automatic) |
|---|---|---|
| 10 KB | Use write_file | Use mcp_write |
| 500 KB | Use streaming_write_file | Use mcp_write |
| 5 MB | Use streaming_write_file | Use write_file |
Same performance, zero cognitive overhead.
See Also
Section titled “See Also”- Core Tools — Complete API reference for all 16 tools
- Migration from v3 — Full migration guide