edit_file
Replace exact text in UTF-8 files and visually verify the selection, overwrite, and save.
Instructions
Replace exact UTF-8 text and show it being selected, overwritten, and saved.
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>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | UTF-8 text file path, absolute or relative to /workspace. | |
| new_text | Yes | Replacement UTF-8 text. | |
| old_text | Yes | Exact text to select and replace; include context if ambiguous. | |
| replace_all | No | Replace every exact match instead of requiring one match. |