ssh_replace_lines
Replace or delete a range of lines in a file on a remote server directly via sed, with no full-file transfer needed.
Instructions
Replace a range of lines in a file on the remote server.
Operates directly via sed on the remote — no full-file transfer needed. If content is empty, the lines are deleted. Both start_line and end_line are 1-based and inclusive.
Args: path: Path to the file on the remote. start_line: First line to replace (1-based, inclusive). end_line: Last line to replace (1-based, inclusive). content: Replacement text. Empty string deletes the line range. host: SSH host alias from config. Uses default if omitted.
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>",
"start_line": "<start_line>",
"end_line": "<end_line>"
},
"name": "ssh_replace_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| start_line | Yes | ||
| end_line | Yes | ||
| content | No | ||
| host | No |