Skip to main content
Glama

shell

Destructive

Executes Android commands via adb—such as dumpsys, am, pm, and getprop—returning output and exit code; set root to run privileged operations.

Instructions

Runs a shell command in Android and returns its output and exit code: dumpsys, am, pm, cmd, wm, getprop and so on. Runs as adb's shell user, or as root with root: true (see root_access). Nothing can be piped into it.

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": "shell"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNo
commandYes
timeout_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Only destructiveHint=true is annotated, so the description usefully adds the privilege model (adb's shell user, or root via root: true) and an important invocation constraint (no stdin piping). It does not address what destructive effects are possible, whether output is truncated, or any timeout behavior, which matters for a raw shell with a destructive hint.

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?

Three short sentences, front-loaded with what it does and what it returns, followed by privilege and the stdin limitation. No filler or repetition.

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

Completeness3/5

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

Return values are covered inline and the privilege model is present, which is good for a tool with no output schema. Gaps remain for a destructive, arbitrary-execution tool: no warning about side effects, no guidance on the timeout parameter, and no note on output size or failure modes.

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?

Schema description coverage is 0%, so the description must carry parameter meaning. It explains 'command' via example subcommands and 'root' via 'root: true (see root_access)', but 'timeout_s' (default 30, max 300) is never mentioned, leaving a third of the parameters undocumented anywhere.

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 in Android') plus the return contract ('output and exit code') and concrete example subcommands (dumpsys, am, pm, cmd, wm, getprop). It implicitly separates itself from the higher-level siblings by being the raw-command escape hatch, but never explicitly says so.

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 'see root_access' pointer and 'Nothing can be piped into it' give some conditional guidance, and the example subcommands hint at the domain. There is no explicit when-to-prefer-this-over-siblings statement despite ~25 higher-level siblings like app_info, props, or ui_tree that overlap with the listed commands.

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