Skip to content

Streaming Tools

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 ReplacementNotes
streaming_write_filemcp_writeAuto-streams when content > 50KB
chunked_read_filemcp_readAuto-chunks when file > 50KB
smart_edit_filemcp_editAuto line-by-line for large files

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
// 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 file
File Sizev3 (manual selection needed)v4 (automatic)
10 KBUse write_fileUse mcp_write
500 KBUse streaming_write_fileUse mcp_write
5 MBUse streaming_write_fileUse write_file

Same performance, zero cognitive overhead.