Skip to main content
Glama

describe_ui

Retrieve the accessibility tree of the foreground app to identify UI elements, their labels, and tap coordinates for automation and testing.

Instructions

Accessibility tree of the foreground app (plus any system alert), one element per line: Type "label" #identifier value=… @(centerX,centerY) WxH. Coordinates are in points and can be passed to tap.

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice UDID or name substring. Defaults to the select_device choice, then IOS_DEVICE_MCP_DEVICE, else the single USB-connected device.
formatNojson returns the raw tree
bundleIdNoInspect this app instead of the detected foreground app
includeOffscreenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 burden. It does well on the return contract — one element per line, field order, coordinate units in points — but says nothing about prerequisites, cost/latency, or what happens when no foreground app or alert exists. The includeOffscreen behavior is also left undisclosed.

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?

A single front-loaded sentence: resource first, then the line format, then the practical payoff about coordinates. Every clause — including the alert-merge and points-unit notes — carries information an agent needs; nothing is padding.

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?

There is no output schema, so the description must — and does — describe the return format in enough detail to parse it. Remaining gaps are moderate: the undocumented includeOffscreen flag and no statement of session/driver prerequisites for a tool that reads the live foreground app.

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?

Schema coverage is 75%, just under the threshold where the schema alone suffices, so the description is expected to compensate a little. It adds nothing about the parameters themselves — format=json/text behavior, bundleId override, and includeOffscreen are documented only in (or, for includeOffscreen, not at all in) the schema.

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 names the exact resource (accessibility tree of the foreground app, plus system alerts) and the output shape, so an agent knows precisely what it gets back. It does not explicitly distinguish itself from the visual alternative (screenshot) or from tap_element, but the resource is specific enough to differentiate in practice.

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?

Usage is only implied: the closing note that coordinates 'can be passed to tap' tells the agent this is a pre-tap inspection step. There is no explicit when-to-use/when-not guidance, no mention of screenshot as the alternative for visual layout, and no stated prerequisite (e.g. that the driver/session must be active).

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