multiread
Read multiple files in one call to cut down API round-trips. Auto-detects encoding, supports custom line ranges, and includes per-file error handling.
Instructions
Reads multiple files in a single call to reduce API round-trips. Encoding-aware: auto-detects file encoding for each file. 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. 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.
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 | |
| 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 | |
| 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, Max: 131072 |