batch
Run multiple codenav tool calls in one request to cut round-trips and tokens. Calls execute in order for reads and writes, with each write previewed and undoable on its own.
Instructions
Run several codenav tool calls in ONE request (saves round-trips and tokens).
Example: batch(calls=[{"tool": "outline", "args": {"file_path": "src/a.py"}}, {"tool": "symbol_info", "args": {"name": "Cart.total"}}]). Works for reads and writes
alike, e.g. two edits in different files: [{"tool": "edit", "args": {"file_path": "src/a.py", "old_string": "x = 1", "new_string": "x = 2"}}, {"tool": "edit_symbol", "args": {...}}].
Each call takes the same arguments as the tool called alone (args is that tool's
parameter object) and behaves as if you had called it separately: calls run in order,
so a later call sees what an earlier write changed, and every write is type-checked,
previewed/applied and undoable on its own (see its own section for the edit id).
The result has one numbered section per call, then a summary line.
stop_on_error: stop at the first call that fails or does not apply a write (the
rest are skipped and listed). Default (null): stop when the batch contains a write,
keep going when it only reads. Up to 25 calls; batch cannot be nested. A call cannot
refer to an earlier call's result ("$1" is refused): make the calls independent.
Annotated as possibly destructive because a batch may contain write calls; a batch made only of read tools (outline, symbol_info, hover, ...) writes nothing.
Not atomic: calls that already ran stay applied (each has its own undo id). Line/column positions you computed before the batch may be stale after an earlier edit in it, so prefer name-based calls (symbol_info, edit_symbol, rename_symbol) after writes. A preview id is invalid once a later call changes the same file.
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": {
"calls": "<calls>"
},
"name": "batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calls | Yes | ||
| stop_on_error | No |