batch_apply_edits
Apply multiple file edits with validation and partial rollback on failure. Preview changes via dryRun before writing.
Instructions
Apply multiple file edits with partial rollback on failure. Validates all edits first — if validation fails, response says explicitly how many edits were applied and which files were written/reverted (NO files are modified). On failure during application, only the failed edit and later edits are reverted; earlier successful edits are preserved. Every response includes message, appliedEdits, written, and per-preview-entry applied. Use dryRun: true (default) to preview changes.
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": "batch_apply_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working dir for resolving relative file paths (default: primary project root) | |
| edits | Yes | List of edits to apply | |
| dryRun | No | Preview all changes without writing (default: true) |