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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| after_line | Yes | ||
| content | Yes | ||
| host | No |