Skip to main content
Glama
mcp-ssh-persistent

mcp-ssh-persistent

by vivusk

ssh_stream_start

Open a stateful interactive SSH shell bound to a unique stream_id, optionally run an initial command, and reuse the stream for later commands without reconnecting.

Instructions

Open a stateful interactive shell (own channel, history disabled) on a server, bound to stream_id; later stream calls use stream_id only. Optional command runs like ssh_stream_write but waits only 2000 ms by default, so long-running commands (tail -f, pm2 logs) return early with [state: timeout]. stream_id must be unique across servers; max 4 streams per server by default.

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": {
      "server": "<server>",
      "stream_id": "<stream_id>"
    },
    "name": "ssh_stream_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
serverYesServer alias from config.json (case-insensitive). Known aliases: (none configured)
commandNoOptional first command (newline appended)
wait_msNoMax wait for the first command in ms (default 2000)
stream_idYesUnique ID for this stream

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it well: it discloses that a dedicated channel is opened, that history is disabled, that the first command returns early with '[state: timeout]' after ~2000 ms, that stream_id must be unique across servers, and that there is a default cap of 4 streams per server. It does not cover authentication expectations or what happens when the stream limit is exceeded, which are meaningful gaps for an unannotated tool.

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?

Three tight sentences, front-loaded with the core action and then the operational caveats. Density is high but every clause carries information; the only minor redundancy is repeating the 2000 ms default that the wait_ms schema field already states.

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?

For a four-parameter stream-creation tool with no annotations and no output schema, the description covers lifecycle setup, stream identity rules, concurrency limits, and the timeout return marker. Missing only error/limit-exceeded behavior and permission requirements, which keeps it out of the top band.

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%, so baseline is 3; the description earns above that by explaining that wait_ms governs only the initial command and defaults to 2000 ms, and that stream_id is a server-scoped unique key reused by subsequent calls. It adds real meaning to the schema rather than restating it.

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 names a specific verb and resource ('Open a stateful interactive shell') and immediately pins down what makes it distinct: own channel, history disabled, bound to stream_id. It explicitly contrasts its command behavior with the sibling ssh_stream_write, so an agent can distinguish the two without reading either schema.

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

Usage Guidelines4/5

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

It establishes the workflow context clearly — this call creates the stream, and 'later stream calls use stream_id only' — plus the intended use case for long-running commands like tail -f and pm2 logs. It stops short of explicitly telling the agent when to prefer ssh_exec or a one-off command over creating a stream, so no true exclusions are stated.

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