Skip to main content
Glama

Execute command

exec_command
Destructive

Run shell commands in a codebase with bounded time and output, returning command IDs for ongoing processes to manage safely.

Instructions

Run a bounded command under runtime policy. Pass workdir explicitly for reconnect-safe paths. A still-running command returns command_id. Example: {"cmd":"pytest -q","workdir":".","yield_time_ms":30000}. Retained output is bounded per stream; for very large output redirect to a file (cmd > out.log 2>&1) and page it with read_file or search_text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cmdYes
cwdNo
envNo
ttyNo
stdinNo
workdirNo.
verbosityNo
timeout_msNo
preview_bytesNo
yield_time_msNo
max_output_bytesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the description doesn't need to repeat those. It adds useful context: commands are bounded, still-running commands return a command_id, and retained output is bounded per stream. This goes beyond annotations without contradicting them.

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 sentences plus an example, front-loaded with the core purpose. Every sentence adds value; no filler. The example is compact and clarifies usage.

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?

While an output schema exists (so return values aren't the description's job), the description does not explain several important parameters and their effects (e.g., verbosity, max_output_bytes). It covers typical usage but not advanced cases, so it's incomplete for a tool with this parameter count.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions workdir (explicitly for reconnect-safety), yield_time_ms (via example), and cmd (in redirect usage), but leaves env, tty, stdin, verbosity, timeout_ms, preview_bytes, and max_output_bytes unexplained. This is partial compensation, insufficient for a tool with 11 parameters.

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 ('bounded command under runtime policy'), and gives a concrete example. It clearly differentiates from file/sibling tools like read_file, list_dir, and search_text by describing command execution.

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?

Provides explicit guidance on when to use: 'Pass workdir explicitly for reconnect-safe paths' and recommends redirecting large output to a file and paging with read_file or search_text. Does not explicitly state when to avoid this tool, but gives clear alternatives for output handling.

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