Skip to main content
Glama
YawLabs

SSH MCP Server

by YawLabs

ssh_tail

Inspect remote log files by reading the last N lines over SSH, with optional grep pattern filtering, without running manual tail or grep 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

TableJSON Schema
NameRequiredDescriptionDefault
grepNoCase-insensitive pattern to filter lines
hostYesSSH hostname or IP address
pathYesAbsolute path to the file to tail
portNoSSH port (default: 22)
linesNoNumber of lines to read from the end (default: 100). Must be a positive integer.
timeoutNoCommand timeout in milliseconds (default: 30000). Also the longest the call waits for a free connection-pool slot (SSH_MCP_MAX_POOL_SIZE, default 100) before the command starts; the wait and the command are bounded separately.
passwordNoSSH password. STRONGLY prefer key-based auth (privateKeyPath or ssh-agent). Passwords pass through MCP protocol frames as plaintext and may be logged by the transport or host process.
usernameNoSSH username (default: current user)
privateKeyPathNoPath to SSH private key

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.17.0
    • changedInput schema / properties / timeout / description
      Previous value: -"Command timeout in milliseconds (default: 30000)"New value: +"Command timeout in milliseconds (default: 30000). Also the longest the call waits for a free connection-pool slot (SSH_MCP_MAX_POOL_SIZE, default 100) before the command starts; the wait and the command are bounded separately."
  2. Changed4 schema fields changedv0.11.0
    • changedInput schema / properties / lines / description
      Previous value: -"Number of lines to read from the end (default: 100)"New value: +"Number of lines to read from the end (default: 100). Must be a positive integer."
    • addedInput schema / properties / lines / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / lines / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / lines / type
      Previous value: -"number"New value: +"integer"
  3. Addedv0.9.1

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the transparency burden. It conveys the operation is a read (tail) and involves a remote host, which implies the safety profile, but it doesn't explicitly mention that it does not modify the file, requires SSH authentication, or may block on a connection pool. Basic but adequate; missing operational details beyond the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with no filler. The core action is front-loaded and the usage guidance appears immediately after, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The rich schema covers all 9 parameters and security caveats, and the description supplies the key usage context. The only minor gap is that the return value (the tailed lines) is not explicitly stated, though it is strongly implied by the purpose. No output schema exists to fill this in, but the omission is easy to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides full 100% parameter descriptions, including defaults, password warnings, and pool behavior, so the description adds little beyond reinforcing the grep filter and lines count. Baseline 3 is appropriate because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read the last N lines'), the resource ('a file on a remote host'), and the optional filter ('grep pattern'). It also explicitly calls out the intended use case (reading log files) and distinguishes itself from ssh_exec, making its purpose easy to grasp.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance: 'Use this for reading log files instead of ssh_exec with manual tail/grep commands.' This directly tells the agent when to select this tool and which sibling to prefer it over, leaving no ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.