Skip to main content
Glama

describe

Retrieve the current screen's accessibility/DOM element tree, including roles, labels, and tap coordinates. Use it to locate UI elements, inspect system dialogs, and guide automated interactions on any attached device.

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 a physical iOS device the tree covers only the app registered by launch-app. 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. On a physical iOS device, launch-app com.apple.springboard first to read system dialogs.

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. The tree carries no z-order or occlusion information: an element listed at a point may be covered by an overlay (e.g. a toolbar over list rows), so check a screenshot when a tap lands unexpectedly.

For app-scoped inspection with full UIKit properties (accessibilityIdentifier, viewClassName), use native-describe-screen with an explicit bundleId instead (iOS simulator 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, and on a physical iOS device.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.24.0
    • changedInput schema / properties / bundleId / description
      Previous value: -"Optional 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."New value: +"Optional 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, and on a physical iOS device."
  2. First observedv0.15.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly. It discloses platform-specific implementation details, coordinate normalization, lack of z-order/occlusion information, Vega's empty-tree retry behavior, TV focus-driven output, and the physical iOS device limitation. It also explains the return shape { description, source } and how to compute tap coordinates.

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 long but every section earns its place given the multi-platform complexity. It is front-loaded with the core purpose, then organized by platform, return format, caveats, and alternatives. There is no redundant filler or restatement of the tool name.

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?

The tool has no output schema and no annotations, so the description must fully compensate. It covers platform-specific behaviors, return format, coordinate system, tap calculation, limitations, fallback suggestions, and sibling alternatives. Nothing an agent needs to invoke and interpret this tool correctly is missing.

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 100%, so the baseline is 3. The main description does not add much parameter-specific meaning beyond the schema, but the schema itself already documents udid and bundleId, including bundleId's fallback behavior and platform limitations. Thus the description adds no significant extra value here.

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 opens with a specific verb and resource: 'Get the accessibility / DOM element tree for the current screen.' It then clarifies what this means across iOS, Android, Chromium, and Vega, and explicitly distinguishes itself from native-describe-screen and debugger-component-tree, so an agent can select it correctly among many siblings.

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?

The description gives explicit when-to-use guidance: use native-describe-screen for app-scoped UIKit inspection, use debugger-component-tree for React Native component names, and use tv-remote on TV targets. It also provides platform prerequisites such as launching com.apple.springboard before reading system dialogs on physical iOS devices.

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

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