edit
Replace literal text in a remote UTF-8 file over SSH by specifying the target host, file path, old and new strings.
Instructions
Edit an existing UTF-8 text file by replacing literal text. REMOTE: paths live on selected target (ssh target.ssh); the edit is applied on the remote host. Read the file first (the read-before-edit policy still applies by convention).
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": {
"file_path": "<file_path>",
"old_string": "<old_string>",
"new_string": "<new_string>",
"target": "<target>"
},
"name": "edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Exact target name from remote_ssh_targets list. Always select the intended host explicitly. | |
| file_path | Yes | Path to edit, on the remote host selected target. A relative path resolves against the target root. | |
| new_string | Yes | Literal replacement text. Use an empty string to delete the match. | |
| old_string | Yes | Literal text to replace. Must match exactly. | |
| replace_all | No | Replace all matches. Defaults to false; when false, old_string must appear exactly once. |