Skip to main content
Glama

run_command

Executes shell commands on the device only after enabling MCP exec/write and in-app approval; use for terminal tasks, expecting approval delays or denial.

Instructions

Runs a shell command on the device. Disabled unless the user turned on Settings → Agents → "MCP: Allow exec/write", and every call still blocks on an in-app approval tap on the phone — expect this to be slow or to fail with "denied" if nobody is there to approve it.

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory (optional — one of list_repos or the home dir)
commandYesShell command to run
timeoutMsNoExecution timeout in ms (default 30000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and meets much of it: it discloses the enablement gate, the blocking in-app approval, expected slowness, and the 'denied' failure mode. It stops short of saying whether the call is destructive or what it returns, such as stdout, stderr, or an exit code.

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 sentences, front-loaded with what the tool does, then the operational caveats. Nothing is repeated and nothing is wasted.

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 an unannotated arbitrary-execution tool, it conveys the critical gating and approval behavior well. It does not explain the return shape, stdout/stderr/exit code, or what happens on timeout, which matters when no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so cwd, command, and timeoutMs are already documented, including the default timeout. The description adds no meaning beyond them, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Runs a shell command on the device.' That distinguishes it from read_terminal_output and write_file, but it never explicitly routes the agent to those siblings.

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 gives strong preconditions, namely that the feature must be enabled and a call must be approved on the phone, plus a failure mode of 'denied'. But it says nothing about when to prefer write_file or read_terminal_output instead of shelling out, so the choice between alternatives 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.