batch_read
Batch read multiple files under a token budget, automatically returning unchanged files as cache hits, diffs for modifications, and full content for new files.
Instructions
Read multiple files under a token budget. Automatically cache-aware.
Use this to seed the cache, gather several files at once, or expand globs
before search, similar, or grep. Prefer over repeated read calls.
Behavior (automatic — no configuration needed):
Unchanged files counted in
summary.unchanged_count(path list in debug mode).Modified files return diffs.
New files return full content.
Large files skipped once token budget is exhausted.
If a file is skipped for budget, use read with offset/limit or
raise the budget.
Args: paths: Comma-separated paths, JSON array, or glob patterns. max_total_tokens: Token budget across the batch. priority: Optional paths to read first before the remaining files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | ||
| max_total_tokens | No | ||
| priority | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | ||
| summary | No | ||
| skipped | No | ||
| files | No |