Edit local text file
edit_fileReplace exact text in local UTF-8 files for precise edits, preserving all other content in the file.
Instructions
Replace exact text in a UTF-8 local file. Use for focused edits that preserve the rest of the file.
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>",
"oldText": "<oldText>",
"newText": "<newText>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| newText | Yes | ||
| oldText | Yes | ||
| replaceAll | No |