Skip to main content
Glama

adb_root_shell

Execute commands as root on a rooted Android device via su, enabling privileged device control when standard ADB access is insufficient.

Instructions

Execute a command as root via su. Requires rooted device.

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

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial
commandYesCommand to run as root

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that the command runs as root via su and requires a rooted device, but it omits critical behavior for an arbitrary root command: potential su prompt on the device, destructive or irreversible effects, failure behavior when root is unavailable, timeouts, and what is returned.

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 two short sentences with no wasted wording, and it front-loads the operation and the prerequisite. Every sentence contributes directly to understanding what the tool does and when it can run.

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

Completeness2/5

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

This is a high-risk arbitrary root execution tool with no annotations and no output schema, so the description should provide more safety and failure context. It covers the root requirement but does not explain su authorization, destructive potential, expected output, or common failure modes, leaving important gaps for correct invocation.

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?

The input schema has 100% description coverage and already documents both 'device' and 'command'. The description does not add syntax, format, quoting, or device-selection guidance beyond what the schema provides, so the baseline of 3 applies.

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 states a specific verb and resource: execute a command as root via su. It clearly distinguishes this tool from adb_shell by specifying root execution through su, and it states the key prerequisite of a rooted device.

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 gives one usage condition, 'Requires rooted device,' which helps an agent decide whether the call is applicable. However, it does not explicitly compare this tool with adb_shell, adb_multi_shell, or other command-execution siblings, nor does it say when not to use root execution.

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