multiread
Read multiple files in one call with encoding detection, per-file line ranges, and truncation metadata, reducing API round-trips and enabling resumable reads.
Instructions
Reads multiple files in a single call to reduce API round-trips. Encoding-aware: auto-detects each file, with optional global/per-file encoding overrides. Supports offset/limit for reading specific line ranges. Defaults to 200 lines per file and 32768 characters total across the call. Returns visible per-file and overall truncation metadata with continuation positions. Resume the same input list with start_file_index=next_file_index and resume_offset=next_offset (omit resume_offset when zero). Use file_paths or paths (string array) with global offset/limit, or files (object array) for per-file offset/limit. If a file fails, the error is included in output and remaining files continue. Maximum 50 files per request.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "multiread"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Remove the default per-file line limit. The total character budget still applies. Default: false | |
| files | No | Per-file read ranges. Each entry has path, offset, limit. Takes priority over file_paths | |
| limit | No | Maximum lines per file. Default: 200. Set 0 or all=true to remove the line limit | |
| paths | No | Compatibility alias for file_paths; prefer file_paths | |
| offset | No | Line number to start from (1-based, negative = from end). Default: 1 | |
| encoding | No | Default charset override, e.g. EUC-KR or CP949; files entries may override it; BOM takes priority | |
| file_paths | No | File paths to read. All files use the global offset/limit. Use files for per-file ranges | |
| include_hash | No | Include per-file SHA-256 hashes. Default: false | |
| resume_offset | No | Override offset only for start_file_index; other files retain their original ranges | |
| max_line_chars | No | Maximum characters returned from one line. Default: 4000, Max: 32768 | |
| max_output_chars | No | Maximum total returned text characters across all files. Default: 32768, Min: 256, Max: 131072 | |
| start_file_index | No | Resume at this 1-based index in the original file list; default 1 |