edit_file
Replace specific text in local development files by matching exact content, enabling precise file modifications for coding tasks.
Instructions
Edit a file by replacing specific text. The old_text must match exactly (including whitespace).
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 | Path to the file | |
| old_text | Yes | Text to find and replace (must match exactly) | |
| new_text | Yes | Text to replace it with |