Skip to main content
Glama

Run adb shell command

adb_shell
Destructive

Run arbitrary shell commands on an Android device to inspect packages or system state, with output truncated to the tail for concise results.

Instructions

Run an arbitrary shell command on the device (e.g. 'pm list packages -3', 'dumpsys battery'). Output is truncated to the tail.

Input Schema

NameRequiredDescriptionDefault
serialNoDevice serial from devices_list. Optional when exactly one device is online.
commandYesCommand line run by the device shell
timeoutSecNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and openWorldHint=false, so the safety profile is covered. The description adds important behavior by noting that output is truncated to the tail, and 'arbitrary shell command' reinforces the broad side-effect potential.

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 tight sentences, front-loading the core action and immediately adding the most important caveat about truncated output. There is no wasted language.

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?

For a destructive arbitrary-shell tool with no output schema, the description covers the main action, examples, and output truncation. It still omits timeout behavior and explicit alternatives, leaving meaningful gaps for safe and efficient 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?

Schema description coverage is 67%, with serial and command documented in the schema. The description adds useful command examples, but it does not explain timeoutSec, whose meaning is only implied by its name and default/min/max values.

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?

The description states a specific verb and resource: running an arbitrary shell command on the device, with concrete examples. It is clear enough to distinguish this from specialized sibling tools, but it does not explicitly route the agent away from tools like packages_list or device_info.

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 examples imply usage for ad-hoc shell diagnostics and package listing, giving some context. However, there is no explicit when-to-use guidance, no exclusions, and no mention of when a specialized sibling tool would be preferable.

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