Skip to main content
Glama

Run a command

run
Destructive

Run a shell command (bash -c) as the user the agent runs as: root for a root agent, otherwise the site owner. No terminal, no stdin. Returns exit code, stdout and stderr (long output keeps the first 16 KB and last 48 KB). Destructive commands need the user's approval.

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory, absolute.
whyNoOne plain sentence for the user, shown on the approval page if this call needs their approval: what it does and why it is needed.
serverNoServer name or id. Optional when the account has one server.
commandYes
timeout_sNoDefault 120, max 1800.
approval_idNoOnly when repeating a call the user approved.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint, openWorldHint and readOnlyHint=false, but the description adds facts the annotations cannot express: the privilege level the command runs under, the absence of a TTY and stdin, the exact return shape (exit code, stdout, stderr), and the truncation policy (first 16 KB and last 48 KB of long output). The approval requirement is consistent with, and elaborates on, destructiveHint.

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 short sentences, front-loaded with what the tool does and under whose identity, followed by I/O limits and the approval gate. No sentence is redundant and nothing is buried.

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?

With no output schema, the description correctly supplies the return contract (exit code, stdout, stderr, truncation). It does not cover what happens on timeout (timeout_s defaults to 120, max 1800) or how a call that hits the approval gate is retried, leaving a small but real gap for a high-risk execution tool.

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 83%, with the required 'command' parameter being the one left undescribed. The description compensates by establishing that the command is passed to 'bash -c' with no stdin, which is real semantic information about how the input is interpreted and not repeated from the schema.

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 names a specific verb and resource ('Run a shell command (bash -c)') and pins the execution identity ('root for a root agent, otherwise the site owner'), which no sibling tool provides. An agent can distinguish this general shell escape from read_file/write_file/db_query 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states constraints ('No terminal, no stdin') and a gating rule ('Destructive commands need the user's approval'), which implies when the tool is usable. However, it never routes the agent away from itself toward more targeted siblings such as read_file, write_file, or db_query, so the choice of this tool over those is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources