Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

idb-ui-tap

Tap on iOS screen at specified coordinates with automatic transformation from screenshot space to device space. Supports single, double, and long press gestures. Validates bounds and provides semantic action tracking for test automation.

Instructions

idb-ui-tap

🎯 Tap at coordinates on iOS screen - core UI automation primitive with screenshot coordinate transformation

What it does

Sends precise tap events to iOS targets at specified screen coordinates with automatic coordinate transformation from screenshot space to device space. Supports single tap, double tap, and long press gestures. Validates coordinates against device screen bounds and provides semantic action tracking for test documentation. Works on both simulators and physical devices over USB/WiFi.

Why you'd use it

  • Automate UI interactions from screenshot analysis - tap elements identified visually

  • Transform screenshot coordinates automatically when screenshots are resized for token efficiency

  • Validate tap coordinates against device bounds before execution to prevent out-of-range errors

  • Track test scenarios with semantic metadata (actionName, expectedOutcome, testScenario, step)

Parameters

Required

  • x (number): X coordinate (device coords or screenshot coords with applyScreenshotScale)

  • y (number): Y coordinate (device coords or screenshot coords with applyScreenshotScale)

Optional

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

  • numberOfTaps (number, default: 1): Number of taps (set 2 for double-tap)

  • duration (number): Long press duration in milliseconds

  • applyScreenshotScale (boolean): Transform screenshot coords to device coords

  • screenshotScaleX (number): Scale factor for X axis from screenshot-inline

  • screenshotScaleY (number): Scale factor for Y axis from screenshot-inline

  • actionName (string): Semantic action name (e.g., "Login Button Tap")

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

  • expectedOutcome (string): Expected result (e.g., "Navigate to HomeScreen")

  • testScenario (string): Test scenario name (e.g., "Happy Path Login")

  • step (number): Step number in test workflow

Returns

Tap execution status with transformed coordinates, input coordinate details (if transformed), action context metadata for test tracking, error details if failed, and verification guidance.

Examples

Tap from screenshot coordinates (auto-transformed)

const result = await idbUiTapTool({
  x: 150, y: 300,
  applyScreenshotScale: true,
  screenshotScaleX: 2.0, screenshotScaleY: 2.0,
  actionName: "Login Button Tap",
  expectedOutcome: "Navigate to HomeScreen"
});
  • idb-ui-describe: Discover tappable elements and their coordinates

  • screenshot: Capture screenshot to identify tap targets

  • idb-ui-gesture: For swipes and hardware buttons

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidNo
xYes
yYes
numberOfTapsNo
durationNo
applyScreenshotScaleNo
screenshotScaleXNo
screenshotScaleYNo
actionNameNo
screenContextNo
expectedOutcomeNo
testScenarioNo
stepNo
Behavior4/5

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

With no annotations, the description must disclose behavioral traits. It explains coordinate transformation, validation, support for single/double/long press, and working on simulators/devices. It mentions error handling and verification guidance in returns. However, it does not mention potential side effects (e.g., navigation changes) or failure modes beyond 'error details'.

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, bullet lists, and an example. It is front-loaded with a summary. While somewhat lengthy, every section adds value (parameters, returns, examples, related tools). Minor redundancy in the 'What it does' vs. 'Parameters' sections could be tightened.

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 has 13 parameters, no output schema, and multiple siblings, the description thoroughly covers purpose, usage context, parameter details, return information, and related tools. It also provides an actionable example, making it complete for an agent to correctly invoke the tool.

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?

Input schema has 0% description coverage, so the description fully compensates. It explains each parameter's purpose (e.g., applyScreenshotScale for coordinate transformation), defaults (numberOfTaps=1), and provides a usage example. This is critical for an agent to use the tool correctly.

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 specifies the tool's action ('Tap at coordinates on iOS screen') and resource ('iOS screen') with specific gesture types. It distinguishes itself from sibling tools like idb-ui-describe (for discovering elements) and idb-ui-gesture (for swipes), providing a clear unique role.

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 explicitly states when to use this tool (e.g., automating UI interactions from screenshot analysis, transforming coordinates, validating bounds, tracking scenarios). It implicitly suggests alternatives by listing related tools (idb-ui-describe, screenshot, idb-ui-gesture) and their purposes.

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