Skip to main content
Glama

android_ui_dump

Get the on-screen accessibility hierarchy as a table of tappable refs with text, class, and bounds, so you can tap by ref instead of guessing pixel coordinates.

Instructions

Dump the on-screen accessibility hierarchy as a table of tappable refs.

Each row gives a ref (n1, n2, ...) usable with android_tap, plus text, content-desc, class, centre point and bounds. Prefer this over guessing pixel coordinates.

Note: Jetpack Compose apps usually expose no resource-ids - match on text/content-desc. If a screen returns no nodes, fall back to android_screenshot and tap by x/y.

Args: device: Device serial; defaults to the first physical device. compact: Show only interactive/labelled nodes (recommended).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNo
compactNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the output format (table with ref, text, content-desc, class, centre point, bounds), the Compose limitation (no resource-ids), and the failure behavior (no nodes -> fallback). It does not explicitly state that the tool is read-only, but the verb 'Dump' and the output description imply a non-mutating inspection. The behavioral context is strong, though it could explicitly state that this is a safe/read-only operation.

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 compact and front-loaded: the first sentence states the core function, the second explains the output rows, and the following sentences add usage guidance and parameter details. Every sentence earns its place, and the structure moves from what to how to when. No fluff or repetition.

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

Completeness4/5

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

For a tool with 2 optional parameters, no output schema, and no annotations, the description covers the essential context: what the output looks like, how to use the refs, the Compose caveat, and the fallback path. It could be slightly more complete by explicitly stating the read-only nature and any prerequisites (e.g., an active session/device), but the core information an agent needs to select and invoke the tool correctly is present.

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. It explains 'device' (serial, defaults to first physical device) and 'compact' (show only interactive/labelled nodes, recommended). Both parameters are meaningfully described beyond their schema definitions. The only minor gap is that it doesn't specify the exact format of the device serial or what 'first physical device' means in a multi-device setup, but the guidance is sufficient for an agent.

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 ('Dump'), a specific resource ('on-screen accessibility hierarchy'), and the output form ('table of tappable refs'). It also distinguishes itself from pixel-coordinate guessing and from sibling tools like android_screenshot and android_tap by explaining what the refs are for. This is a clear, non-tautological purpose statement.

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?

The description explicitly says when to use this tool ('Prefer this over guessing pixel coordinates') and provides a fallback path ('If a screen returns no nodes, fall back to android_screenshot and tap by x/y'). It also gives a practical tip for Jetpack Compose apps (match on text/content-desc). This is strong usage guidance with both a when-to-use and a when-not-to-use/alternative.

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