Skip to main content
Glama
onlineY
by onlineY

ssh_run

Execute shell commands on remote hosts to inspect or change system state, returning output and exit code. Supports background execution and per-host command rules.

Instructions

Execute a shell command on a remote host and return stdout, stderr and the exit code. Use for inspecting state (logs, processes, ports, containers, service status) and for changing it (deploy, restart, edit). Prefer one command per call; chain with && when steps must be ordered. Set background=true for long-running or daemonizing commands so the call returns at once. Each host has its own allowCommands/denyCommands rules; a refusal names the rule that blocked it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
hostYes
commandYes
timeoutNo
backgroundNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and largely succeeds: it discloses the return shape, the background/daemonizing behavior, and the policy-refusal model ('a refusal names the rule that blocked it'). It does not explain timeout behavior, cwd semantics, or whether commands are run as a privileged user, leaving a few operational unknowns for a mutation-capable 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?

Four dense sentences, front-loaded with purpose then immediately branching into read vs. write usage, sequencing advice, the background flag, and the policy caveat. No filler and every sentence carries actionable information.

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?

An output schema exists so return values need not be spelled out, and the description still adds policy-refusal and background context. However, for a tool that can mutate remote state, the absence of any note on timeout defaults, cwd resolution, or privilege level leaves small but real gaps.

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 0%, so the description must compensate, and it only partially does: it explains background=true and ties host to per-host allowCommands/denyCommands rules. cwd, timeout, and the format/escaping of command are undocumented in both schema and description, so roughly half the parameters remain unexplained.

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 opens with a specific verb+resource ('Execute a shell command on a remote host') and even states the return payload (stdout, stderr, exit code). It implicitly separates itself from ssh_run_many by emphasizing 'one command per call', and the policy/allowCommands note ties it to the ssh_run policy siblings.

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?

Explicit when-to-use is given for both read ('inspecting state: logs, processes, ports, containers, service status') and write ('deploy, restart, edit') scenarios, plus sequencing guidance ('chain with &&') and a concrete rule for background=true. The only gap is that it never names ssh_run_many as the multi-host alternative, but it does constrain its own scope clearly.

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