Skip to main content
Glama

UI hierarchy

ui_dump

Dump the current Android screen's UI hierarchy as uiautomator XML, including element text and bounds, to locate exact tap coordinates.

Instructions

Dump the current screen's UI hierarchy (uiautomator XML) with element text and bounds — use it to find exact tap coordinates.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the return content (element text and bounds), but it does not explicitly state that the operation is read-only, whether it has side effects, or any device/ADB prerequisites.

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 a single front-loaded sentence that states the action, output format, and practical use with no wasted words.

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 zero-parameter tool with no output schema, the description adequately covers what is returned (uiautomator XML with text and bounds) and why to use it. Minor omissions like read-only status or prerequisites keep it from being fully complete.

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?

The tool has zero parameters, so there is no parameter semantics to explain; the baseline for zero parameters is 4.

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 screen's UI hierarchy') and names the concrete output format (uiautomator XML). It implicitly distinguishes itself from screenshot by focusing on hierarchy and coordinates, but does not explicitly name a sibling tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear use case ('use it to find exact tap coordinates'), which tells the agent when this tool is appropriate. It does not, however, specify when not to use it or name alternatives such as screenshot.

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