ssh_tail
Read the last N lines of a remote file over SSH, with optional grep filtering, to inspect logs and avoid manual tail commands.
Instructions
Read the last N lines of a file on a remote host, optionally filtering by a grep pattern. Use this for reading log files instead of ssh_exec with manual tail/grep commands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | Case-insensitive pattern to filter lines | |
| host | Yes | SSH hostname or IP address | |
| path | Yes | Absolute path to the file to tail | |
| port | No | SSH port (default: 22) | |
| lines | No | Number of lines to read from the end (default: 100). Must be a positive integer. | |
| timeout | No | Command timeout in milliseconds (default: 30000) | |
| username | No | SSH username (default: current user) | |
| credential_id | No | Alias of an SSH password configured only on the MCP server (for example, ssh1 resolves to SSH_CREDENTIAL_SSH1). Never pass a real password here. | |
| privateKeyPath | No | Path to SSH private key |