Skip to main content
Glama

dump_ui

Retrieve the current Android UI hierarchy as structured data, providing test scripts with all visible elements to inspect and interact with the screen.

Instructions

(Android) Dump the current UI hierarchy and return a structured representation of all visible elements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idNoTarget device ID. If omitted, uses the default device.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.8.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure, but it only restates the core function and the visible-element scope. It does not disclose whether the tool is read-only, whether it requires an accessibility or instrumentation setup, or what performance/impact it may have.

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 one focused sentence with no filler, and the platform and primary action are front-loaded. Every phrase ('current', 'structured representation', 'visible elements') contributes meaning.

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

Completeness2/5

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

This is a simple tool with one optional parameter, but the absence of an output schema and annotations means the description should explain more about the returned structure and how to use the result. It also does not address the closely related observe_ui sibling, leaving selection and output interpretation under-specified.

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?

The input schema already documents device_id at 100% coverage, including the default-device behavior. The description adds no extra parameter semantics, so the schema-baseline score of 3 is appropriate.

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 clearly states the verb ('dump'), the resource ('current UI hierarchy'), and the output ('structured representation of all visible elements'), so an agent can tell what the tool does. It does not differentiate itself from the overlapping sibling observe_ui, so it stops short of a 5.

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

Usage Guidelines2/5

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

No guidance is given about when to use dump_ui instead of alternatives like observe_ui, find_element, or describe_element. The '(Android)' prefix is useful context but not a selection rule, and there are no exclusions or conditions.

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