Skip to main content
Glama

dump_ui

Extract current Android screen UI hierarchy as flat elements with text, IDs, classes, bounds, and clickability. Filter empty containers or keep only clickable nodes for automation.

Instructions

Dump the current on-screen view hierarchy as a flat list of elements {text, resource_id, content_desc, class, clickable, enabled, bounds:{...,center_x,center_y}}.

non_empty_only drops nodes with no text/id/description (usually layout containers); clickable_only keeps only clickable nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNo
clickable_onlyNo
non_empty_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/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 does disclose how the two boolean flags change the returned node set ('drops nodes with no text/id/description', 'keeps only clickable nodes'), which is genuine behavioral context, but it says nothing about device preconditions, the serial parameter, or whether a device must be connected.

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 tightly written sentences, front-loaded with the return shape and followed by the filter semantics. The inline field list is arguably redundant with the existing output schema, but it is compact and aids immediate comprehension.

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?

An output schema exists, so the description need not explain return values, and the parameter behavior is well covered for two of three flags. The remaining gap is the serial parameter and any device-connection precondition, which leaves the definition slightly short for a tool with zero annotation coverage.

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, and it does for two of three parameters: non_empty_only and clickable_only are explained with meaning beyond their names, including the rationale ('usually layout containers'). The serial parameter is left entirely undocumented in both schema and description, keeping this short of a 5.

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 ('Dump the current on-screen view hierarchy as a flat list of elements') and even enumerates the returned element fields, so the purpose is unmistakable. It does not, however, differentiate itself from sibling inspection tools such as find_elements or tap_element, which an agent must choose between.

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?

There is no explicit 'use this when...' guidance or comparison to alternatives. Usage is only implied through the flag semantics: non_empty_only is for dropping layout containers and clickable_only is for isolating tappable targets, which hints at workflow but never says when this tool beats find_elements.

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