Skip to main content
Glama

ssh_exec

Execute shell commands on remote hosts with tiered blast-radius containment and post-flight assertions for ports, processes, and files. Blocks destructive operations unless explicitly confirmed.

Instructions

Execute shell command on remote host with Matlock 3-Tier blast-radius containment and post-flight state assertions (verifies listening ports, process liveness, file existence). Blocks destructive operations unless confirmed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoOptional environment variables to pass into remote process.
targetNoOptional SSH connection target. If omitted, uses default profile (homelab).
commandYesThe exact shell command to execute.
timeoutMsNoTimeout in ms (default 60000ms).
assertionsNoOptional forensic post-flight assertions.
workingDirNoRemote directory to cd into prior to command.
confirmDangerTokenNoMust be true to execute Tier 3 destructive operations (e.g. root rm -rf, reboot, mkfs).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the containment tiers, destructive-operation blocking, and that assertions run post-flight (ports, processes, files). It omits what happens when a command is blocked or an assertion fails, and says nothing about execution/auth behavior beyond the schema's key-vs-password note.

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?

A single dense sentence that front-loads the action and then the safety machinery; no wasted filler. The faintly marketing tone ('Matlock 3-Tier blast-radius') is tolerable but slightly reduces crispness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive-capable tool with nested params, no annotations, and no output schema, the description covers the guardrail story but leaves notable gaps: return format, assertion-failure behavior, and timeout/blocking semantics. Adequate but not complete.

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 description coverage is 100%, so all seven parameters are already documented in the schema; baseline is 3. The description adds only a general mention of assertions (listening ports, process liveness, file existence) that the schema already enumerates, so it adds little param-level value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Execute shell command on remote host') and adds distinguishing machinery (3-Tier blast-radius containment, post-flight assertions). It doesn't name a sibling to contrast against (e.g. ssh_exec_background), so it falls short of a 5, but the core purpose is unmistakable.

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

Usage Guidelines3/5

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

Implies when it applies by warning that destructive operations are blocked unless confirmed, which tells the agent a confirmDangerToken path exists. However it never says when to prefer this over ssh_exec_background or ssh_task_poll for long-running work, leaving sibling routing to inference.

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