Skip to main content
Glama

ssh_run_command

Execute a single non-interactive shell command on a remote host and return stdout, stderr, exit code, and duration; supply host_id, command, and timeout_seconds.

Instructions

Run a single non-interactive shell command on a remote host. Returns stdout, stderr, exit code, and duration. Call host_list first — it returns the uid of every host, and that value is what host_id expects. The model must use host_id only; connection credentials are resolved server-side and never returned. The model MUST supply timeout_seconds (1-600) appropriate for the command; the command is terminated when the timeout expires.

Input Schema

NameRequiredDescriptionDefault
commandYesShell command to execute on the remote host.
host_idYesIdentifier of an existing host: the exact `uid` value returned by `host_list`. Call `host_list` first and pass that value unchanged.
timeout_secondsYesHard timeout in seconds. REQUIRED. The model must estimate an appropriate timeout based on the command's complexity (1-600 seconds). The command is terminated when the timeout expires.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 well: it discloses the return payload (stdout, stderr, exit code, duration), that credentials are resolved server-side and never exposed, and that the command is terminated on timeout. It does not warn that arbitrary remote command execution is potentially destructive or state whether large output is truncated, which are meaningful omissions for a mutation-capable tool with no annotations.

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?

Front-loaded with the core purpose in the first sentence, followed by return values and then the two hard prerequisites. All sentences are relevant, though the host_list and timeout sentences largely duplicate schema text, which is slight redundancy rather than waste.

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?

No output schema exists, and the description compensates by enumerating the return fields and the timeout termination behavior. It is nearly complete for a three-parameter execution tool; the remaining gap is how non-zero exit codes and error conditions are surfaced.

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?

Schema coverage is 100%, so all three parameters are already documented in the schema, including the host_list prerequisite and the 1-600 timeout range. The description restates that same information rather than adding new syntax or format detail, so the baseline 3 applies.

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 a single non-interactive shell command on a remote host') and the 'single non-interactive' qualifier implicitly distinguishes it from ssh_run_interactive and ssh_run_playbook. An agent can identify the tool's scope without opening the 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?

Gives an explicit prerequisite workflow ('Call host_list first — it returns the uid'), which is genuine when-to-use guidance. It stops short of naming alternatives such as ssh_run_interactive or ssh_run_playbook as the choice for multi-step or interactive work, so the routing to siblings is left implicit.

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