Skip to main content
Glama

exec

Run a shell command on a host over SSH and get back stdout, stderr, exit code, and truncation status. Blocks commands that would cut the live transport unless explicitly overridden.

Instructions

Run a shell command on a host over SSH and report stdout/stderr/exit code/truncation; commands that would stop the service carrying the live transport are refused with TRANSPORT_SEVERED_RISK unless override is "sever-transport".

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

Input Schema

NameRequiredDescriptionDefault
hostNoHost name or address
commandYesShell command for the host platform
overrideNoSet to "sever-transport" to run a command the safety gate refused
timeoutMsNoKill the command after this many ms

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 substantial work: it discloses the return surface (stdout/stderr/exit code/truncation), a named error condition (TRANSPORT_SEVERED_RISK), and an override path. Gaps remain around authentication/credentials, whether shell state persists between calls, and whether execution blocks for the full timeout.

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?

It is a single front-loaded sentence with no filler, starting with the action and following with the safety gate. The semicolon-joined clause makes it dense and slightly harder to parse, and splitting the output-reporting and safety behavior would improve scanability.

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?

There is no output schema and no annotations, so the description must compensate; it covers the return shape at a high level but not truncation limits or the format of the reported values. It also does not say what happens when the optional host is omitted or how this differs from the existing shell_* tools.

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 four parameters are already documented, including the override enum and its literal value. The description restates the safety-gate/override relationship already present in the schema rather than adding new syntax, format, or defaulting semantics, so baseline 3 applies.

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?

The description gives a specific verb and resource ("Run a shell command on a host over SSH") plus what it returns, so the purpose is unambiguous. However, it never distinguishes itself from siblings such as shell_run, admin_exec, or adb_exec, so an agent cannot tell from the text alone which exec-style tool to pick.

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?

The SSH-over-host context and the override escape hatch imply when this tool is appropriate, and the description names the exact condition that triggers the safety refusal. There is no explicit guidance on when to prefer shell_open/shell_run or admin_exec instead, so the agent must infer the choice.

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