ssh_insert_lines
Insert text after a specific line in a remote file via SSH. Specify file path, line number, and content; only new content is sent.
Instructions
Insert text after a specific line number in a file on the remote server.
Operates directly via sed on the remote — no full-file transfer needed. Only the new content is sent over the wire.
Args: path: Path to the file on the remote. after_line: Line number to insert after (1-based). Use 0 to insert at the beginning. content: Text content to insert. 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>",
"after_line": "<after_line>",
"content": "<content>"
},
"name": "ssh_insert_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| after_line | Yes | ||
| content | Yes | ||
| host | No |