Skip to main content
Glama

UI hierarchy

ui_dump
Read-onlyIdempotent

Dump the current Android screen's UI hierarchy with element text and bounds to find 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ui_dump"
  }
}

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?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so safety and repeatability are covered structurally. The description adds the return format and content, which is genuine added value, but says nothing about preconditions such as the target screen being foregrounded, refresh timing, or whether the dump can be stale.

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?

One sentence, front-loaded with what is dumped, followed by the format and the practical purpose. Every clause earns its place and there is no redundant restatement of the title.

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?

With no output schema, the description must convey return content, and it does by naming uiautomator XML with element text and bounds. For a zero-parameter read tool this is nearly complete; only preconditions about the device's current screen state are missing.

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 takes zero parameters, which is the baseline-4 case, and the description correctly implies nothing is configurable. No parameter naming or formatting guidance is needed here.

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?

States a specific verb and resource ('Dump the current screen's UI hierarchy') plus the concrete format (uiautomator XML) and payload (element text and bounds). It implicitly separates itself from the screenshot sibling by promising structured element data rather than an image, but never names or contrasts an alternative explicitly.

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?

'use it to find exact tap coordinates' gives a clear positive condition for selecting this tool over a visual capture. It stops short of stating when not to use it, e.g. that screen must be in the foreground or that it is unnecessary when a screenshot already suffices.

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