search_and_replace
Find and replace text in a document and write the result to a new file. If multiple matches exist, replace fails unless scope is set to 'all'.
Instructions
One-shot text replace written to a NEW file; fails closed on 2+ matches unless scope='all'.
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>",
"find": "<find>",
"replace": "<replace>",
"out_path": "<out_path>"
},
"name": "search_and_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | ||
| path | Yes | ||
| scope | No | ||
| replace | Yes | ||
| out_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |