Skip to main content
Glama

Run a command

run_command
Destructive

Execute programs with direct arguments, bypassing shell interpretation. For pipelines, invoke zsh with -c. Requires admin mode and allowlist configuration.

Instructions

Run a program with arguments (no shell — pass argv, not a command line). Requires admin mode AND MACCTL_ALLOW_EXEC=true; the program must be in MACCTL_COMMAND_ALLOWLIST when that is set. For a shell pipeline, run command="zsh", args=["-c","…"].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory (supports ~).
argsNoArguments (each passed verbatim; no shell expansion).
commandYesProgram to run (name or absolute path).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

The description adds meaningful context beyond the annotations, explaining that no shell expansion occurs and that execution is gated by admin mode and an allowlist. This complements the destructiveHint=true annotation by showing what preconditions govern execution. It does not describe output or exit-status behavior, but the safety-critical behavior is well covered.

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 dense sentences convey the core behavior, the shell caveat, the required environment flags, and the workaround for pipelines. There is no filler or repetition of schema details.

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 calling the tool correctly, the description is largely sufficient: it covers invocation, prerequisites, and argument formatting. It does not mention what the tool returns, but with no output schema that would be helpful; still, the missing return details are less critical than the clearly documented execution constraints.

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 the baseline is 3, but the description adds value by explaining the no-shell argv semantics and by giving a concrete zsh -c example. This helps the agent understand how to construct arguments correctly rather than just reading field names.

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 states a precise action: run a program with arguments. It also clarifies the critical distinction from other tools: no shell, pass argv rather than a command line. This clearly separates it from sibling tools like run_applescript or open.

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?

The description gives explicit invocation guidance: pass argv, not a command line, and use zsh -c for pipelines. It also states prerequisites such as admin mode and MACCTL_ALLOW_EXEC, which helps the agent know when the call will fail. It does not enumerate when to prefer sibling tools, but the usage context is clear.

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