Skip to main content
Glama

describe

Return the UI element tree for a device's current screen, including roles, labels, interactivity flags, and normalized tap coordinates — works on iOS, Android, Chromium, and TV.

Instructions

Get the accessibility / DOM element tree for the current screen. On iOS, uses the AXRuntime accessibility service to inspect whatever is currently visible — including system dialogs, permission prompts, and any foreground app content. On Android, runs uiautomator dump. On Chromium, walks the renderer's DOM via Chrome DevTools Protocol — every visible element with its ARIA role, accessible name, and bounding rect (normalized to 0–1). On Vega (Fire TV), reads the on-device automation toolkit (getPageSource); each element carries [focused]/[selected] so you can see where the D-pad cursor is, then move it with the tv-remote tool (Vega is remote-driven, not touch). If describe returns an empty tree on Vega, relaunch the foreground app (the toolkit attaches at launch) and try again.

When a system dialog is visible, describe returns the dialog's interactive elements (buttons, text) with tap coordinates. When no dialog is present, it returns the foreground app's accessible elements.

Returns { description, source } where description is a text rendering of the UI tree — one line per element with its role, label/value/id, interactivity flags, and frame. Frame coordinates are normalized [0,1] fractions of the screen / window width/height (not pixels) — the same space as gesture-tap / gesture-swipe / gesture-pinch.

To tap an element use the centre of its frame: tap_x = frame.x + frame.width / 2, tap_y = frame.y + frame.height / 2. The same formula appears in the response header so it can be applied to a line in isolation.

For app-scoped inspection with full UIKit properties (accessibilityIdentifier, viewClassName), use native-describe-screen with an explicit bundleId instead (iOS only). For React Native apps, debugger-component-tree returns React component names with tap coordinates.

On a TV target (Apple TV / Android TV — a list-devices entry with runtimeKind 'tv') this returns the focus-driven view instead: the currently FOCUSED element and the list of FOCUSABLE elements, since a TV UI has no tap coordinates. Move the highlight with tv-remote (up/down/left/right/select/ back/menu/home), then call describe again to confirm where focus landed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id).
bundleIdNoOptional app bundle ID. Used as a target hint on iOS when the AX-service returns no elements and the describe tool falls back to native-devtools inspection. If omitted, the fallback auto-detects the frontmost connected app. Ignored on Android / Chromium.
Behavior5/5

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

No annotations provided, but the description fully discloses platform internals (AXRuntime, uiautomator, CDP, getPageSource), return format, coordinate normalization, and TV focus behavior. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but every sentence adds value, with clear platform breakdowns and practical instructions. Well-structured, though slightly verbose; could be trimmed slightly without losing key info.

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

Completeness5/5

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

Despite no output schema, the description fully covers return format, coordinate usage, platform-specific behaviors, and error recovery hints (Vega relaunch). Sufficient for an agent to use correctly across contexts.

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 coverage is 100%, and the description adds meaningful context for bundleId (fallback behavior, ignored on Android/Chromium) beyond the schema. The udid parameter is well-described in schema but description reinforces it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves the accessibility/DOM element tree, specifies multiple platform mechanisms, and distinguishes itself from sibling tools like native-describe-screen and debugger-component-tree.

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

Usage Guidelines5/5

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

Explicitly recommends alternatives for app-scoped inspection (native-describe-screen) and React Native (debugger-component-tree), and provides TV-specific instructions. Covers when to use relaunch on Vega.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-mansion/argent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server