Skip to main content
Glama

command_run

Destructive

Run an allowlisted executable with separate arguments inside an allowed root and wait for exit; no shell string, and long-running commands should use process_start and process_output.

Instructions

Run one allowlisted executable with a separate argument array inside an allowed root and wait for it to exit. No free-form shell command string is accepted. timeoutMs is capped at 240000 ms (shell.maxTimeoutMs); a run still going at the cap is killed and returns timedOut with the output captured so far. Use process_start and process_output for longer runs, such as coding-agent CLIs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
argsNo
agentNoOptional existing runtime binding for monitor attribution; no extra handshake.
commandYes
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the allowlist/root constraints, the 240000 ms cap tied to shell.maxTimeoutMs, that a run at the cap is killed, and that timedOut is returned with partial output captured so far. That kill/return semantics is exactly the operational context annotations cannot express.

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 sentences, each load-bearing, with the core capability front-loaded and the timeout/alternative details following in priority order. No filler or restatement of the tool name.

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 does cover the notable return case (timedOut plus partial output), but it does not sketch the general result shape (exit status, stdout/stderr). Combined with the kill and allowlist constraints, an agent has enough to call it correctly, though not a full picture of the response.

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?

With only 20% schema description coverage, the description compensates by defining command (allowlisted executable, no shell string), args (separate argument array), timeoutMs (240000 ms cap), and implying cwd must sit inside an allowed root. The agent param is left to its schema description, which is acceptable but leaves a small gap.

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 (Run) and resource (one allowlisted executable with a separate argument array inside an allowed root), plus the scope constraint that no free-form shell string is accepted. It also names process_start/process_output as the different alternative, so an agent can distinguish it from siblings 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?

Explicitly routes long-running work (e.g. coding-agent CLIs) to process_start and process_output, and implies the bounded-execution case is what this tool covers. It omits any guidance versus the closely related parallel_command_run sibling, so routing is not fully complete.

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