multi_edit
Batch find-and-replace edits on a single file atomically: all operations succeed or none are applied.
Instructions
Perform multiple find-and-replace operations on a single file atomically. All edits succeed or none apply.
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_path": "<file_path>",
"edits": "<edits>"
},
"name": "multi_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | Array of edit operations (applied sequentially) | |
| backup | No | Create .bak backup file before editing (default: true) | |
| dry_run | No | Preview changes without applying (default: false) | |
| file_path | Yes | Absolute path to the file to modify | |
| include_content | No | Include final file content in response (default: false, use for verification) |