edit_file
Replace exact text in a file with new content to update existing file sections. Optionally replace all occurrences.
Instructions
Update an existing file by replacing target text with new text.
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>",
"target": "<target>",
"replacement": "<replacement>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to edit | |
| target | Yes | Exact string content to replace | |
| replaceAll | No | Whether to replace all occurrences of target (default: false) | |
| replacement | Yes | New replacement content |