efs_edit
Perform surgical find-and-replace in files. Specify unique old text, replacement count, or preview changes with dry run before writing.
Instructions
Surgical find/replace in a file. oldText must be unique. count: default 1, use -1 for all occurrences. Set dryRun=true to preview the change without writing. Creates automatic backup.
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": "efs_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path | |
| count | No | Replacement count (-1 = all) | |
| range | No | Excel range (optional) | |
| dryRun | No | Preview only — do not write to disk. Returns excerpts of the change. | |
| newText | Yes | Replacement text | |
| oldText | Yes | Text to find |