apply_edits
Batch apply multiple text replacements to a file in one operation, with atomic rollback on failure.
Instructions
Apply a batch of str_replace edits to a single file in one round-trip. Edits applied in order against the running in-memory text; atomic (rolled back in memory if any edit fails).
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": {
"file": "<file>",
"edits": "<edits>"
},
"name": "apply_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| edits | Yes | ||
| vault | No | ||
| dry_run | No | ||
| expected_content_hash | No |