Skip to main content
Glama

describe_ui

Read-only

Inspect the foreground iOS app's accessibility tree to list UI elements, labels, identifiers, and tap coordinates for automating tests and interactions.

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.

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": "describe_ui"
  }
}

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
includeOffscreenNoInclude elements outside the screen, marked [offscreen] (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • addedInput schema / properties / includeOffscreen / description
      Added value: +"Include elements outside the screen, marked [offscreen] (default false)"
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful context beyond that: system alerts are included and coordinates are in points. However, it omits whether elements are actionable, truncation or size limits, and performance on complex screens.

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?

Two dense sentences with the returned format and coordinate semantics front-loaded. No filler, and the line template conveys the structure efficiently.

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 appropriately carries the burden of describing the return format via the line template and units. Parameters are fully documented in the schema, so the only real gap is guidance on when to choose this over a screenshot or element-targeted tools.

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 all four parameters are already documented in the schema. The description only marginally supplements this by describing the default text line format and confirming coordinate units in points; the format, bundleId, and includeOffscreen parameters are not elaborated on further.

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 states the specific resource and scope precisely: the accessibility tree of the foreground app plus system alerts. It does not name a sibling or explicitly contrast with screenshot or tap_element, so an agent must infer the distinction from the returned format.

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 by the closing note that coordinates 'can be passed to tap', which hints at a find-then-act workflow. There is no explicit when-to-use or when-not-to-use guidance relative to screenshot or tap_element.

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