Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

accessibility-quality-check

Rapidly assess the richness of an app's accessibility tree and get a recommendation to use accessibility data or fall back to screenshots, saving tokens and time.

Instructions

accessibility-quality-check

Quick assessment of accessibility tree richness - decide whether to use accessibility or screenshots.

Overview

Rapidly queries the accessibility tree and assesses data richness without returning full element details. Returns a quality score and recommendation (accessibility-ready or screenshot-fallback) in ~80ms with minimal token cost. Prevents agents from wasting tokens on expensive screenshots when accessibility data is sufficient.

Parameters

Optional

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

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

Returns

  • quality: "rich" | "moderate" | "minimal"

  • recommendation: "accessibility-ready" | "consider-screenshot"

  • elementCounts: Total elements, tappable elements, text fields, element types

  • queryTime: Query execution time in milliseconds

  • queryGuidance: Next steps based on quality assessment

Examples

Quick check of current screen

const check = await accessibilityQualityCheckTool({
  screenContext: 'LoginScreen'
});

if (check.quality === 'rich') {
  // Use accessibility: idb-ui-describe
} else {
  // Fall back to screenshot
}

Check before deciding automation approach

const assessment = await accessibilityQualityCheckTool({
  udid: 'DEVICE-UDID'
});

// Workflow guided by quality

Quality Levels

Rich (✅ Use accessibility)

  • 3 tappable elements, OR

  • Text input fields detected

  • Recommendation: Use idb-ui-describe and accessibility-based navigation

Moderate (⚠️ Try accessibility first)

  • 2-3 tappable elements

  • Some custom UI that may not be recognized

  • Recommendation: Try accessibility tree first, fall back to screenshot if needed

Minimal (📸 Use screenshot)

  • ≤1 element, OR

  • No tappable elements found

  • Recommendation: Take screenshot for visual analysis

How It Works

  1. Quick query: Calls idb ui describe-all (~80ms)

  2. Assess richness: Counts tappable elements, text fields

  3. Return score: Quality assessment + recommendation

  4. No elements returned: Just the counts and guidance

Cost Comparison

  • accessibility-quality-check: ~80ms, 30 tokens

  • Full idb-ui-describe: ~120ms, 50 tokens

  • screenshot: ~2000ms, 170 tokens

  • idb-ui-describe: Full accessibility tree with element details

  • idb-ui-find-element: Search for specific element by name

  • screenshot: Visual fallback when accessibility insufficient

Notes

  • Returns quality assessment only (not full element tree)

  • Recommended as first step before choosing automation approach

  • Saves tokens by preventing unnecessary screenshots

  • Identifies when UI has minimal accessibility support

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidNo
screenContextNo
Behavior5/5

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

The description fully discloses that the tool returns only quality scores and counts, not full element details. It specifies execution time (~80ms), token cost (~30 tokens), and the three quality levels, providing complete behavioral transparency beyond the lack of annotations.

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 well-structured with headings, tables, and code examples, making it easy to parse. However, it is somewhat lengthy; a slightly more concise version could improve efficiency without losing value.

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 lacking an output schema, the description fully explains return values (quality, recommendation, elementCounts, queryTime, queryGuidance), how it works, and cost comparison. It is complete for the tool's complexity.

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?

The input schema has 0% description coverage, but the description provides clear meanings for both parameters: udid (target identifier, auto-detects if omitted) and screenContext (screen name for semantic tracking). Examples further illustrate 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 the tool's purpose: 'Quick assessment of accessibility tree richness - decide whether to use accessibility or screenshots.' It specifies the verb (assess) and resource (accessibility tree richness) and distinguishes from sibling tools like idb-ui-describe and screenshot.

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 provides explicit guidance on when to use (as a first step before choosing an automation approach), when not to use, and alternatives. It includes cost comparisons, quality levels with recommendations, and examples.

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