Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

idb-ui-describe

Query iOS accessibility tree to find tappable elements and text fields with precise centerX/centerY coordinates. Returns element properties, data quality assessment, and supports progressive filter levels for accurate automation.

Instructions

idb-ui-describe

🔍 Query UI accessibility tree - discover tappable elements and text fields for precise automation

What it does

Queries iOS accessibility tree to discover UI elements, their properties (type, label, enabled state), coordinates (frame, centerX, centerY), and accessibility identifiers. Returns full tree with progressive disclosure (summary + cache ID for full data), element-at-point queries for tap validation, and data quality assessment (rich/moderate/minimal) to guide automation strategy. Automatically parses NDJSON output to extract all elements (not just first), includes AXFrame coordinate parsing for precise tapping, and caches large outputs to prevent token overflow.

Progressive Filtering: Supports 4 filter levels for element discovery - start conservative with moderate filtering (default), escalate to permissive/none if minimal data found.

iOS Compatibility: Recognizes iOS-specific accessibility fields (role, role_description, AXLabel, AXFrame) in addition to standard fields.

Why you'd use it

  • Discover all tappable elements from accessibility tree - buttons, cells, links identified by JSON element objects

  • Get precise tap coordinates (centerX, centerY) for elements without needing screenshots

  • Assess data quality before choosing automation approach - rich data enables precise targeting, minimal data requires screenshots

  • Validate tap coordinates by querying elements at specific points before execution

  • Progressive disclosure prevents token overflow on complex UIs - get summary first, full tree on demand

  • Progressive filter escalation - start with moderate filtering, escalate to permissive/none if minimal data found

Parameters

Required

  • operation (string): "all" | "point"

Point operation parameters

  • x (number, required for point operation): X coordinate to query

  • y (number, required for point operation): Y coordinate to query

Optional

  • udid (string): Target identifier - auto-detects if omitted

  • screenContext (string): Screen name for context (e.g., "LoginScreen")

  • purposeDescription (string): Query purpose (e.g., "Find tappable button")

  • filterLevel (string): "strict" | "moderate" | "permissive" | "none" (default: "moderate")

    • strict: Only obvious interactive elements via type field (original behavior)

    • moderate: Include iOS roles (role, role_description) - DEFAULT, fixes iOS button detection

    • permissive: Any element with role/type/label information

    • none: Return everything (debugging)

Returns

For "all": UI tree summary with element counts (total, tappable, text fields), data quality assessment (rich/moderate/minimal), top 20 interactive elements preview with centerX/centerY coordinates, uiTreeId for full tree retrieval, current filter level, and guidance on automation strategy including suggestions to escalate filter level if minimal data found.

For "point": Element details at coordinates including type, label, value, identifier, frame coordinates (x, y, centerX, centerY), enabled state, and tappability.

Examples

Query full UI tree with default moderate filtering

const result = await idbUiDescribeTool({
  operation: 'all',
  screenContext: 'LoginScreen',
  purposeDescription: 'Find email and password fields'
});
// Result includes elements with centerX, centerY for direct tapping

Progressive filter escalation pattern

// 1. Start with default (moderate)
let result = await idbUiDescribeTool({ operation: 'all' });

// 2. If minimal data, try permissive
if (result.summary.dataQuality === 'minimal') {
  result = await idbUiDescribeTool({
    operation: 'all',
    filterLevel: 'permissive'
  });
}

// 3. If still minimal, try none (return everything)
if (result.summary.dataQuality === 'minimal') {
  result = await idbUiDescribeTool({
    operation: 'all',
    filterLevel: 'none'
  });
}

// 4. If STILL minimal, fall back to screenshots
if (result.summary.dataQuality === 'minimal') {
  // Use screenshot-based approach
}

Validate element at tap coordinates

const element = await idbUiDescribeTool({
  operation: 'point',
  x: 200,
  y: 400
});
// Element includes frame coordinates if available
  • idb-ui-tap: Tap discovered elements using centerX/centerY coordinates

  • screenshot: Capture screenshot for visual element identification

  • idb-ui-find-element: Semantic element search by label/identifier

  • accessibility-quality-check: Quick assessment before choosing approach

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidNo
operationYes
xNo
yNo
screenContextNo
purposeDescriptionNo
Behavior5/5

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

Despite no annotations, the description thoroughly explains behavior: progressive disclosure with caching, automatic NDJSON parsing, filter levels, and iOS-specific field handling. It also covers data quality assessment and performance considerations (token overflow prevention).

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 comprehensive and well-structured with headings, bullet points, and examples. Though lengthy, each section adds value and is front-loaded with a clear summary. Minor verbosity could be trimmed but it's well-organized.

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?

Given the tool's 6 parameters and lack of output schema/annotations, the description provides complete guidance. It covers return values, filter levels, examples, and integration with sibling tools. The progressive disclosure and strategy patterns ensure effective agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, the description adds extensive meaning for all 6 parameters. It explains operation enum values, x/y coordinates for point operations, auto-detection of udid, and filterLevel with detailed explanations. Examples further clarify usage.

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 queries the iOS accessibility tree to discover UI elements, their properties, and coordinates. It distinguishes from sibling tools like idb-ui-tap (tapping) and idb-ui-find-element (semantic search) by focusing on discovery and data quality assessment.

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 describes when to use: discover tappable elements, get precise coordinates, assess data quality, validate tap coordinates. Provides progressive filter escalation and mentions alternatives (e.g., screenshots for minimal data). Also references related tools for further actions.

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/conorluddy/xc-mcp'

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