replace_in_file
Replace all occurrences of a specified text with new content directly inside a file, enabling in-place editing without manual search.
Instructions
Replace all occurrences of old with new in a 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>",
"old": "<old>",
"new": "<new>"
},
"name": "replace_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new | Yes | Replacement text. | |
| old | Yes | Text to find. | |
| path | Yes | File to edit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |