read_multiple_files
Read up to 20 files in one call, with optional line ranges or pattern search. Individual file errors don't block others, and full metadata is recorded so edits pass strict mode without re-reading.
Instructions
Read up to 20 files in a single call. Each file's content is returned under a '### ' heading, followed by that file's own read_file header (mtime, sha256, line and byte counts) so it can be edited without re-reading — reads ARE recorded per file, exactly like read_file, so edit_file works under [edits] strict mode with no re-read. Errors for individual files are reported inline — one unreadable file doesn't block the others. Accepts absolute paths, file:// URIs, or workspace-relative paths. Binary files are detected and skipped. Each file is subject to the same 200 KiB cap as read_file. Pass start_line/end_line or pattern (with use_regex/context_lines/max_matches) to slice or search EVERY path in the call uniformly — same semantics as read_file's own parameters, applied per file; there is no per-path override, so a windowed batch read still records EACH file's full mtime/sha in the read tracker (identical to read_file's own ranged-read behaviour — strict mode is mtime-based, not range-based, so a later edit anywhere in the file is still covered). The 20-path cap is unchanged by slicing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Absolute paths, file:// URIs, or workspace-relative paths of files to read. | |
| pattern | No | Search EVERY path in this call for this pattern instead of returning a window — same semantics as read_file's pattern (literal by default, smart-case, Go RE2 regex when use_regex). Combine with start_line/end_line to restrict the search to that line window in every file. | |
| end_line | No | Last line to return (1-based, inclusive) from EVERY path in this call. Omit to read to the end of each file. | |
| use_regex | No | Treat pattern as a Go RE2 regular expression. Only consulted when pattern is set. | |
| start_line | No | First line to return (1-based, inclusive) from EVERY path in this call — same semantics as read_file's start_line, applied uniformly. Omit to start from the beginning of each file. | |
| max_matches | No | Maximum matching lines to return per file in search mode. Default 200. Only consulted when pattern is set. | |
| context_lines | No | Lines of context around each match (like rg -C), applied to every path. Default 0. Only consulted when pattern is set. |