Replace text in remote file
replace_in_fileReplace all exact text matches in a file and write changes back, with backup by default.
Instructions
Read a file, replace all exact text matches, and write it back with backup by default.
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": {
"domain": "<domain>",
"path": "<path>",
"find": "<find>"
},
"name": "replace_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | Exact text to replace. | |
| path | Yes | File path relative to the configured domain root. | |
| backup | No | Back up existing file before writing. | |
| domain | Yes | Configured domain root to operate under. | |
| dry_run | No | Return preview without writing. | |
| replace | No | Replacement text. | |
| server_id | No | Server profile id. Defaults to config.defaultServer. | |
| backup_label | No | Backup label used in the generated filename. |