Batch Read
batch_readRead multiple files at once within a shared token budget to avoid many separate read calls; unchanged files collapse to counts or diffs using known hashes, and oversized files are skipped.
Instructions
Read several files at once under a shared token budget.
Cheaper than many single read calls. To make files searchable without
reading them at all, use warm instead — this tool returns their text.
Pass known_hashes and each file you still hold collapses to an
unchanged count, or to a diff when it moved on disk; the rest come back
in full with their content_hash. A file over max_size comes back
as a map (see read) and carries none: a map is not the file. Smallest files are read
first, and a file too big for the remaining budget is listed under
skipped while smaller ones keep being read. Recover anything skipped with
read using offset/limit. Paths are relative to the root the
response names, when there is one worth naming.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"paths": "<paths>"
},
"name": "batch_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | The files to read — a comma-separated list, a JSON array, or glob patterns (expanded for you). | |
| priority | No | Optional paths to read first, ahead of the remaining files. Ordering only — a priority file still has to fit the budget, and is skipped like any other when it does not. | |
| known_hashes | No | JSON object mapping a path to the `content_hash` you still hold for it, e.g. `{"src/a.py": "8f3c..."}`. Any file you cannot vouch for this way is sent in full. | |
| max_total_tokens | No | Total token budget shared across the whole batch. |