Skip to main content
Glama

adb_shell

Execute shell commands on a connected Android device via adb to control, inspect, or modify it directly. Use for full adb shell access when managing a device you own.

Instructions

Run a shell command on a connected Android device via adb. As powerful as adb shell itself - only use against a device you control.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
workspaceNoWorkspace name (not id) - created automatically if it doesn't exist yet. Defaults to "default".
deviceSerialNoOnly needed with more than one device connected

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the safety burden and does warn that the tool is as powerful as adb shell and should only be used on a controlled device. It does not detail side effects, output behavior, or failure modes, but the warning conveys the primary arbitrary-execution risk.

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 short sentences, front-loaded with the core action and a safety warning. No redundant filler.

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?

Adequate for a straightforward tool: the command and device are specified, and the power is flagged. Missing context includes how output is returned, how to verify a device is connected (sibling adb_devices), and when deviceSerial is needed beyond the schema note.

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 coverage is 67%: command has no schema description, but the tool description identifies it as a shell command. workspace and deviceSerial are already documented in the schema, so the description adds little beyond what the schema provides.

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?

Description specifies a concrete action ('Run a shell command on a connected Android device via adb') and clarifies scope with 'as powerful as adb shell itself'. This naturally distinguishes it from sibling tools like adb_install and adb_logcat, which are narrower operations.

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 implies usage for arbitrary command execution via adb, and adds a safety constraint ('only use against a device you control'). However, it does not explicitly state when to prefer this over siblings such as adb_install, adb_logcat, or frida_trace, nor does it describe exclusions.

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