Skip to main content
Glama

run_command

Execute commands inside a workspace using mode-based allowlists to restrict operations, supporting safe dev tasks and expert tools while preventing dangerous commands.

Instructions

Execute a command inside a workspace.

The ``mode`` argument controls the command allowlist.  Supported values:

* ``safe`` (default): Only allow a restricted set of commands (git, uv, pip install,
  pytest/unittest, ruff, mypy).  This prevents dangerous operations.
* ``expert``: Allows the same commands plus additional dev tools (not implemented here).

Commands that violate the allowlist will raise a ``PermissionError``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo.
modeNosafe
commandYes
timeout_sNo
workspace_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description thoroughly discloses behavioral traits: the allowlist mechanism, safe and expert modes, and the PermissionError for violations. It also honestly notes that the expert mode is 'not implemented here', which prevents false expectations.

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 concise and well-structured: a one-sentence purpose, a clear bulleted list of modes, and a brief error note. No unnecessary words, and the most critical info is front-loaded.

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?

The description covers purpose, security restrictions, and error behavior, which is essential for a command runner. The output schema handles return values, so missing return description is fine. It does not mention execution shell, timeout semantics, or working directory details, but these are partially implied by parameter names.

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?

The description adds meaningful detail for the mode parameter (values and default), but the schema has 0% description coverage for all five parameters. It fails to explain command, cwd, workspace_id, and timeout_s, so the compensation is incomplete for the parameter set.

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 clearly states 'Execute a command inside a workspace' with a specific verb and resource, distinguishing it from specialized sibling tools like run_tests and run_lint. It conveys a generic command execution role with a security allowlist.

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 explains the mode argument and allowed command sets, giving context for safe vs expert usage. However, it does not explicitly say when to use this tool versus specialized siblings or mention exclusions/alternatives, so usage guidance is implied rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/saakshigupta2002/PR_Orchestrator_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server