edit_file
Perform targeted edits by locating exact text and replacing it with new content. Provide a file path, search string, and replacement to update specific occurrences without altering the rest of the file.
Instructions
Make a targeted edit to a file using search and replace.
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>",
"search": "<search>",
"replace": "<replace>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative file path | |
| search | Yes | Exact text to find | |
| replace | Yes | Text to replace with | |
| replace_all | No | Replace all occurrences |