Skip to main content
Glama
pmboxbiz

mcp-ssh-live

by pmboxbiz

ssh_tail

Retrieve incremental output from a running SSH job started by ssh_spawn. Uses a cursor to fetch only new lines, optionally waiting for more output. Returns status when job completes.

Instructions

Stream incremental output from a job started by ssh_spawn. Given a monotonic cursor 'since_line_no', return every buffered line with line_no > cursor (up to max_lines). If wait_ms > 0 and nothing new is available, block up to wait_ms milliseconds for new output. Returns still_running=False and exit_status when the job has finished.

Canonical polling loop (use this): cursor = 0 while True: r = ssh_tail(job_id, since_line_no=cursor, wait_ms=5000, max_lines=500, stream='both') for ln in r['lines']: show_to_user(ln) cursor = r['last_line_no'] if not r['still_running']: break

If r['buffer_truncated'] is True, older output was evicted from the ring buffer before you read it — either live with the gap or increase limits.ring_buffer_lines on the server. This tool does NOT open a new SSH connection per call; all data comes from in-memory buffers maintained by the spawn's reader threads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesThe id returned by ``ssh_spawn``.
since_line_noNoYour cursor. 0 on the first call; on each subsequent call, pass the ``last_line_no`` from the previous response. Negative values are clamped to 0.
wait_msNoIf > 0 and no new lines are immediately available, block up to this many milliseconds waiting. Capped internally at 60000 ms so a misbehaving caller can't hold an MCP channel for 10 minutes. Values below 10 ms are treated as 0 (no wait) because condvar wakeup latency eats them anyway.
max_linesNoMaximum lines to return in this response. Capped internally at 10000. The cap is there to keep a single response payload small — if the buffer has more lines pending, just poll again with an updated cursor.
streamNo``"stdout"``, ``"stderr"``, or ``"both"`` (default). "both" merges the two streams by line_no, which gives the true interleaved order a human would see.both

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations provided, but the description fully discloses blocking behavior, exit status, buffer cap, and polling mechanics. It explains internal caps and clamping, leaving no ambiguity about the tool's behavior.

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

Conciseness4/5

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

The description is well-structured with a clear front-loaded purpose, followed by a concrete usage example and additional notes. While lengthy, every sentence adds essential context without redundancy.

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

Completeness5/5

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

Given the tool's complexity (5 parameters, output schema), the description covers all aspects: usage pattern, parameter details, behavioral nuances, and error handling (buffer truncation). No gaps are apparent.

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

Parameters4/5

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

Schema coverage is 100% (all parameters described), but the description adds significant value by explaining the polling loop, cursor usage, and stream merging details. This goes beyond the schema's basic descriptions.

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 specifies it streams incremental output from a job, using specific verbs like 'stream' and 'return'. It distinguishes from siblings like ssh_spawn by focusing on reading output rather than starting jobs.

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?

Provides a canonical polling loop with clear steps, explains when to use (incremental output) and handles edge cases like buffer truncation. Explicitly states it reuses existing SSH connections, differentiating from tools that open new connections.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pmboxbiz/mcp-ssh-live'

If you have feedback or need assistance with the MCP directory API, please join our Discord server