replace_text
Replace exact text in a file to update content. If multiple matches occur, use replace_all=true to replace them all.
Instructions
Make an exact text replacement in a file. This modifies the computer and refuses ambiguous multiple matches unless replace_all=true.
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": "replace_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| encoding | No | utf-8 | |
| new_text | Yes | ||
| old_text | Yes | ||
| replace_all | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||