Edit batch
project_edit_batchApply edits across multiple files atomically: if any edit fails, roll back all touched files and skip remaining changes. Use for multi-file changes that must fully succeed or not apply.
Instructions
Apply edits across one or more files all-or-nothing. Each item takes edit_file arguments (relative_path, old_text, new_text, ...). The first failure rolls back every touched file from an automatic snapshot and skips the rest. Use when: a change spans several files or sections and must land completely or not at all. Avoid when: you make one edit (project_edit_file). Output: success: per-edit {relative_path, replacements, sha256_after}. Failure: ok=false, error batch_failed, data {executed, skipped, rollback_succeeded, snapshot_id}.
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": {
"edits": "<edits>"
},
"name": "project_edit_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | edit_file argument objects (typed like project_edit_file). Unknown fields are rejected with a did-you-mean hint and nothing is applied. Snapshot first when later checks may need a full rollback; automatic rollback covers in-batch failures only. | |
| max_response_bytes_per_item | No | Max serialized bytes per edit item (default 1 MiB). |