Skip to main content
Glama

Run command

bash
Destructive

Run a shell command in the project sandbox, at the project root (cwd is relative to it). Never start the app server here: use set_run_config. Default timeout 60 s (timeout_ms 1000-300000). A command still running then returns a shell_id: wait for it with bash_await.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "bash"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNo
commandYes
project_idNoProject id (or use session from use_project)
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +300000
    • addedInput schema / properties / timeout_ms / minimum
      Added value: +1000
    • changedInput schema / properties / timeout_ms / type
      Previous value: -"number"New value: +"integer"
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, so the danger profile is covered; the description adds real value on top with the 60 s default timeout, the 1000-300000 range, and the shell_id/async continuation behavior. It does not discuss sandbox limits (filesystem persistence, network) beyond what openWorldHint implies, so it stops just short of full disclosure.

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 clauses, front-loaded with the core action and context, then the prohibition, then the timeout semantics, then the async escape hatch. No sentence is redundant or misplaced.

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 explains the one non-obvious return case (shell_id when the timeout is hit). What it omits is the ordinary return contract — whether stdout/stderr and exit codes are returned or whether non-zero exit raises an error — which matters for interpreting results.

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 only 25%, so the description must carry the load, and it does for two of four params: cwd is defined relative to the project root, and timeout_ms gets both a default and a valid range. project_id is left to the schema (which does describe it), and command is self-evident, so the gap is small.

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 and resource ('Run a shell command') plus the execution context ('in the project sandbox, at the project root'), which is exactly the scope information an agent needs. It also implicitly separates itself from set_run_config (server startup) and bash_await (follow-up on long commands).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Gives explicit when-not guidance ('Never start the app server here: use set_run_config') and names the follow-up tool for the async case ('wait for it with bash_await'). Both an exclusion and the alternative are spelled out, leaving nothing 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