edit_file
Replace strings in a file by providing a path and alternating old/new text pairs. Confirms each change with applied status and diffs.
Instructions
String-replace edits. Returns {applied, diffs} confirming each change.
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": {
"path": "<path>",
"edits": "<edits>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | [old, new, old, new, ...] pairs | |
| path | Yes | Relative path |