Skip to main content
Glama

run_command

Run one allowlisted local command, such as git, grep, ls, or find, in the project root and return its output; set cwd to target a subdirectory.

Instructions

Run a single allowlisted command inside the project root and return its output. Exactly one program per call: pipes, chaining (&&, ;), redirects (>) and command substitution are not allowed. Allowed programs: cat, diff, echo, file, find, git, grep, head, ls, pwd, rg, stat, tail, tree, wc. Optionally set 'cwd' to a subdirectory of the root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
commandYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 behavioral burden and does disclose important constraints: exactly one program per call, no pipes/chaining/redirects/substitution, confinement to the project root, and an explicit allowlist. It does not state whether any allowed commands can mutate files or repository state, nor does it mention timeouts, output limits, or authentication requirements.

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?

The description is front-loaded with the core purpose and then immediately lists the hard restrictions and allowlist. The longer allowlist is necessary and earns its place; there is no filler.

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?

For a command-execution tool with two parameters, no annotations, and an output schema, the description covers the essential invocation constraints well. The main remaining gap is the absence of a clear safety profile, such as whether commands are read-only or can modify project files.

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 description coverage is 0%, so the description must compensate for both parameters, and it does: it explains that 'command' must be a single allowlisted program with no shell metacharacters, and that 'cwd' optionally points to a subdirectory of the project root. It would be stronger with explicit mention of the default root behavior or example command syntax.

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?

The description uses a specific verb ('Run') and resource ('a single allowlisted command inside the project root'), and clearly states that it returns output. It is plainly distinct from the read-only file and directory siblings, even without naming 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?

The description gives clear constraints for what kinds of commands are acceptable, including the allowlist and prohibition on shell chaining, but it never states when an agent should choose run_command over read_file or list_directory. Usage is therefore implied rather than explicitly guided.

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

Deploy Server

Other Tools