Skip to main content
Glama
jms-ssh-mcp
by digyear

Run a command on a host

jms_ssh_run

Runs a single shell command on a host behind a bastion and returns its output and real exit code, reusing one per-host connection so you pass a host, not a session.

Instructions

Run one shell command on a host behind the bastion; returns its output and real exit code. The connection is opened, reused and re-entered internally — pass a host, never a session. Very long output is cut to head+tail (truncated: true), so narrow log reads with tail -n / journalctl -n / grep. Any spelling of the same asset (id, IP, hostname) reuses one connection.

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": {
      "host": "<host>",
      "command": "<command>"
    },
    "name": "jms_ssh_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesAsset id, IP or hostname
accountNoSystem user on the asset (e.g. root). Given, it logs in directly as "<login>@<account>@<host>" and skips the bastion menu; omit to pick through the menu
commandYesShell command, run as one line
maxBytesNoOutput cap for this call
timeoutMsNoDefault from JMS_SSH_COMMAND_TIMEOUT_MS

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the agent knows this executes against an external system. The description adds real value beyond that: connection open/reuse/re-entry lifecycle, per-asset connection reuse across id/IP/hostname spellings, and head+tail truncation signaled by 'truncated: true'. It stops short of covering timeout/failure behavior or the risk that an arbitrary shell command may mutate the target, which matters for a non-read-only tool.

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?

Three dense sentences, each carrying distinct information: what it does and returns, the connection model constraint, then the truncation caveat and its workaround. The critical scoping rule ('pass a host, never a session') is front-loaded with no filler.

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?

With no output schema, the description correctly covers the return contract (output plus real exit code, plus the 'truncated' flag). Remaining gaps are modest: how timeouts and connection failures are surfaced is not described, and the default-timeout reference is left to the schema.

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 the baseline is 3, but the description goes further by explaining that any spelling of the same asset (id, IP, hostname) resolves to one reused connection, which changes how an agent should pick 'host'. It also frames output size behavior in a way that motivates maxBytes, though timeoutMs is left entirely to the schema.

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?

States a specific verb and resource ('Run one shell command on a host'), the execution context ('behind the bastion'), and the return shape ('output and real exit code'). The clause 'pass a host, never a session' separates it cleanly from the session-oriented siblings (jms_ssh_close, jms_ssh_connections).

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?

Gives explicit operative guidance: pass a host not a session, and narrow large reads with 'tail -n / journalctl -n / grep' instead of pulling everything. It does not name a when-not or point to a concrete alternative sibling for connection inspection, so it falls short of the top band.

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