fs_edit
Replace a specific string in a file; fails if not found. Use replace_all for every occurrence.
Instructions
Replace a string in a file. Fails if old_string is not found. Set replace_all=true to replace every occurrence.
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": {
"id": "<id>",
"path": "<path>",
"old_string": "<old_string>",
"new_string": "<new_string>"
},
"name": "fs_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| path | Yes | ||
| new_string | Yes | ||
| old_string | Yes | ||
| replace_all | No | Replace all occurrences (default: first only) |