Skip to main content
Glama

run

Execute a raw command on a device when standard actions cannot complete the task, returning stdout, stderr, and the exit code; destructive commands are refused unless explicitly confirmed.

Instructions

Escape hatch: run a raw command on the device and return stdout, stderr and exit code.

For android_adb devices the command runs as adb shell <command>. Use this only when act cannot do the job. Commands that look destructive (factory reset / wipe, recursive delete, uninstalling or disabling apps, reboot, dd / mkfs, turning debugging or the network off, ...) are refused. Never pass confirm=true on your own initiative: first tell the user exactly what the command will do, get their spoken "yes", and only then repeat the call with confirm=true. On a device with strict: true every command needs that confirmation, not only destructive ones. timeout is in seconds (max 120); long output is truncated.

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": {
      "device": "<device>",
      "command": "<command>"
    },
    "name": "run"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceYes
commandYes
confirmNo
timeoutNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the destructive-command refusal policy, the mandatory human-confirmation protocol, the strict-mode variant, the timeout ceiling, and output truncation behavior. These are policies an agent could not infer from the schema alone.

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?

Front-loaded with the core purpose and the alternative, then progressively narrower rules. The destructive-command enumeration is long but directly actionable, and no sentence is filler or repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-risk arbitrary-command tool, the definition covers purpose, alternative routing, refusal policy, consent workflow, timeout limit, and output shape. An output schema exists, so it does not need to explain return structure further, and nothing an agent needs to call this safely is missing.

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 description coverage is 0%, so the description must compensate, and it does for three of four parameters: `command` (executed as `adb shell <command>`), `confirm` (never self-initiated; required on strict devices), and `timeout` (seconds, max 120). The `device` parameter is left with only its name, which is a small but real gap given the zero-coverage 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?

Opens with a specific verb+resource framing ("run a raw command on the device") and names the return payload (stdout, stderr, exit code). It also explicitly positions itself against the sibling `act` as an escape hatch, so an agent can tell the two apart without opening either schema.

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 an explicit when-to-use (only when `act` cannot do the job) and detailed when-not guidance by enumerating refused command classes (factory reset, recursive delete, uninstall, reboot, dd/mkfs, disabling debugging/network). It also documents the escalation path (confirm=true only after user consent) and the stricter variant for `strict: true` devices.

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

Deploy Server

Other Tools