Skip to main content
Glama

ssh_exec

Destructive

Run a single shell command on one of your servers and return its combined output and exit code. Runs keyless over Termalin's tunnel — no SSH key, and the server needs no open inbound port. Each call is a fresh shell (cd does not persist — chain with &&). Keep a call under about 90 seconds: for anything longer (installs, builds, backups) use job_start and check on it with job_status.

Input Schema

NameRequiredDescriptionDefault
hostYesServer id from hosts_list
commandYesShell command to execute
usernameNoLogin user (defaults to the tunnel's user, else root)
timeoutSecondsNoMax seconds to wait (default 60). Calls longer than about 90 seconds are usually cut off by the network before they answer — run long jobs in the background instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / timeoutSeconds / description
      Previous value: -"Max seconds to wait (default 60, up to 300)"New value: +"Max seconds to wait (default 60). Calls longer than about 90 seconds are usually cut off by the network before they answer — run long jobs in the background instead."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations cover safety profile (destructive, openWorld, non-idempotent), and the description adds traits annotations cannot express: keyless tunnel with no inbound port, a fresh shell per call so 'cd does not persist — chain with &&', and the network-enforced ~90s cutoff. These are exactly the behavioral facts an agent needs to call it correctly.

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 tight sentences, front-loaded with what the tool does and what it returns before moving to caveats and escalation path. No sentence is filler; each carries a distinct constraint or routing hint.

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?

No output schema exists, but the description names the return values (combined output and exit code). Combined with the timeout guidance, shell-persistence caveat, and long-job escalation path, nothing an agent needs to invoke this correctly is missing.

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 adds real semantic value for the 'command' parameter: the fresh-shell/no-persistent-cd rule and the ~90s ceiling that makes timeoutSeconds meaningful. The 'host' and 'username' parameters get no comparable treatment, keeping it short of a 5.

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+resource ('Run a single shell command on one of your servers') plus the return value ('combined output and exit code'). The word 'single' implicitly distinguishes it from the sibling ssh_exec_many.

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?

Explicitly routes long-running work away from this tool: 'for anything longer (installs, builds, backups) use job_start and check on it with job_status.' It also names the concrete threshold (~90 seconds) that selects the alternative, leaving no inference to the agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources