Skip to main content
Glama

run_command

Execute shell commands in a specified working directory while blocking catastrophic patterns and requiring confirmation for high-risk operations.

Instructions

Run a shell command in a given working directory (npm install, npm run build, pip install, tests, etc.). A short list of catastrophic patterns (drive wipes, format, shutdown) is blocked; everything else executes with full permissions. HIGH risk — requires confirm: true.

Input Schema

NameRequiredDescriptionDefault
cwdYesWorking directory to run the command in
commandYesThe shell command to run
confirmNoMust be true to proceed
timeout_msNoTimeout in ms, default 60000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.3

TDQS

A3.8/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 well: it discloses that commands execute with full permissions, that only a short list of catastrophic patterns is blocked, and that a confirmation flag is mandatory. Missing are return semantics (stdout/stderr/exit code handling) and timeout/termination behavior, which matter for a shell executor.

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?

Two tight sentences, front-loaded with the action and scope, followed by the safety/blocklist behavior and the confirm gate. No filler, and the risk warning is placed where it will be read before invocation.

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 high-risk, no-annotation, no-output-schema command executor, the description is adequate on safety but incomplete on results: it never says what the agent gets back (captured stdout, stderr, exit status, truncation) or how timeouts surface. It also omits routing guidance against the dedicated build/test/lint siblings, which is a real gap given this list.

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 baseline is 3; the description adds genuine value by explaining why 'confirm' exists (HIGH risk gate) rather than just restating the schema's 'Must be true to proceed'. It says nothing extra about cwd or timeout_ms, but the schema already documents those fully.

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 ('Run a shell command in a given working directory') with concrete example activities, so the agent knows exactly what it does. It does not, however, differentiate itself from siblings like run_tests, run_build, run_lint, or run_typecheck, even though its own examples (tests, build) overlap with them.

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?

It clearly signals high risk and the 'confirm: true' prerequisite, and notes that most commands are allowed while a blocklist is refused. But there is no explicit when-to-use guidance versus the dedicated run_tests/run_build/run_lint siblings, and no guidance on when to prefer those instead; usage is only implied.

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