Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

idb-ui-gesture

Perform swipe gestures and hardware button presses on iOS targets. Automates scrolling, navigation, and device controls with configurable profiles and precise coordinates. Includes automatic velocity validation for gesture recognition.

Instructions

idb-ui-gesture

👆 Perform gestures and hardware button presses - swipes, scrolls, and device controls for navigation

What it does

Executes swipe gestures (directional or custom paths) and hardware button presses on iOS targets. Supports standard swipe directions (up, down, left, right) with automatic screen-relative path calculation using configurable profiles (flick, swipe, drag), custom swipe paths with precise start/end coordinates, and hardware button simulation (HOME, LOCK, SIRI, SCREENSHOT, APP_SWITCH). Automatically validates velocity to ensure iOS recognizes gestures as swipes (>6000 px/sec). Validates coordinates against device bounds and provides semantic action tracking.

Why you'd use it

  • Automate scroll and navigation gestures - swipe to reveal content, dismiss modals, page through carousels

  • Use optimized swipe profiles for different UIs - flick for fast page changes, swipe for standard scrolling, drag for slow interactions

  • Test hardware button interactions without physical device access - home button, lock, app switching

  • Execute precise custom swipe paths for complex gesture-based UIs (drawing, map navigation)

  • Track gesture-based test scenarios with semantic metadata (actionName, expectedOutcome)

Parameters

Required

  • operation (string): "swipe" | "button"

Swipe operation parameters

  • direction (string): "up" | "down" | "left" | "right" - auto-calculates screen-relative path

  • profile (string, default: "standard"): "standard" | "flick" | "gentle" - gesture profile

  • startX, startY, endX, endY (numbers): Precise POINT coordinates for custom swipe path

  • duration (number, default: 200): Swipe duration in MILLISECONDS (e.g., 200 for 200ms) - uses profile default if omitted

Button operation parameters

  • buttonType (string): "HOME" | "LOCK" | "SIDE_BUTTON" | "APPLE_PAY" | "SIRI" | "SCREENSHOT" | "APP_SWITCH"

Optional

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

  • actionName (string): Semantic action name (e.g., "Scroll to Bottom")

  • expectedOutcome (string): Expected result (e.g., "Reveal footer content")

Swipe Profiles (Empirically Tested)

  • standard: Default balance (75% distance, 200ms, 1475 points/sec) - perfect for general navigation

  • flick: Fast page changes (85% distance, 120ms, 2775 points/sec) - use for carousel/rapid navigation

  • gentle: Slow scrolling (50% distance, 300ms, 653 points/sec) - reliable but near-minimum threshold

All coordinates in POINT space (393×852 for iPhone 16 Pro), NOT pixel space. All profiles tested and verified working on iOS 18.5 home screen.

Complete JSON Examples

Swipe Up (Scroll Down)

{"operation": "swipe", "direction": "up", "profile": "standard", "actionName": "Scroll Down"}

Swipe Down (Scroll Up)

{"operation": "swipe", "direction": "down", "profile": "standard", "actionName": "Scroll Up"}

Swipe Left (Navigate Forward)

{"operation": "swipe", "direction": "left", "profile": "standard", "actionName": "Go to Next Page"}

Swipe Right (Navigate Back)

{"operation": "swipe", "direction": "right", "profile": "standard", "actionName": "Go to Previous Page"}

Flick Swipe (Fast Page Navigation)

{"operation": "swipe", "direction": "left", "profile": "flick", "duration": 120, "actionName": "Fast Swipe to Next"}

Gentle Swipe (Slow Scrolling)

{"operation": "swipe", "direction": "up", "profile": "gentle", "duration": 300, "actionName": "Slow Scroll Down"}

Custom Swipe Path (Precise Coordinates)

{"operation": "swipe", "startX": 196, "startY": 600, "endX": 196, "endY": 200, "duration": 200, "actionName": "Custom Scroll"}

Press Home Button

{"operation": "button", "buttonType": "HOME", "actionName": "Background App"}

Press Lock Button

{"operation": "button", "buttonType": "LOCK", "actionName": "Lock Device"}

Press Side Button

{"operation": "button", "buttonType": "SIDE_BUTTON", "actionName": "Trigger Side Button Action"}

Press Siri Button

{"operation": "button", "buttonType": "SIRI", "actionName": "Activate Siri"}

Press Screenshot Button

{"operation": "button", "buttonType": "SCREENSHOT", "actionName": "Capture Screenshot"}

Press App Switch Button

{"operation": "button", "buttonType": "APP_SWITCH", "actionName": "Show App Switcher"}

Returns

Gesture execution status with operation details (direction/button, path coordinates for swipes), duration, velocity info, gesture context metadata, error details if failed, and verification guidance.

Examples

Standard swipe up (default profile)

const result = await idbUiGestureTool({
  operation: 'swipe',
  direction: 'up',
  actionName: 'Scroll to Bottom',
  expectedOutcome: 'Reveal footer content'
});

Flick swipe for fast page navigation

await idbUiGestureTool({
  operation: 'swipe',
  direction: 'left',
  profile: 'flick',
  actionName: 'Go to Next Page'
});

Press home button

await idbUiGestureTool({ operation: 'button', buttonType: 'HOME' });
  • idb-ui-tap: For precise element tapping

  • idb-ui-describe: Find element coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidNo
operationYes
directionNo
startXNo
startYNo
endXNo
endYNo
durationNoSwipe duration in milliseconds (e.g., 200 for 200ms, default: 200ms)
buttonTypeNo
actionNameNo
expectedOutcomeNo
Behavior5/5

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

With no annotations provided, the description fully discloses key behaviors: velocity validation (>6000 px/sec), coordinate bound checking, profile parameterization with empirically tested metrics, and semantic action tracking. No contradictions with annotations exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with headings and bullet points, but overly verbose. Profile details are repeated in the 'Swipe Profiles' section and again in the 'Why you'd use it' list. Some example JSON is redundant (e.g., multiple swipe directions). Could be trimmed without losing clarity.

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 11 parameters, 1 required, no output schema, and no annotations, the description provides near-complete context: parameter details, JSON examples for every operation/button, return value summary, and empirical profile data. Minimal gaps (e.g., exact return format could be more structured).

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?

Schema description coverage is only 9% (only 'duration' has a description). The description compensates comprehensively: explains operation values, direction semantics, profile defaults/behavior, coordinate space (point vs pixel), buttonType enumeration, and optional parameters (actionName, expectedOutcome). It adds units and example values beyond schema.

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 starts with a clear verb ('Perform gestures and hardware button presses') and specifies resources ('swipes, scrolls, and device controls for navigation'). It distinguishes itself from sibling tools by explicitly listing related tools (idb-ui-tap, idb-ui-describe) with brief differentiators.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Why you'd use it' section outlines specific scenarios (automate scroll, test hardware buttons, custom paths). The 'Related Tools' section references alternatives, though it does not explicitly state when not to use this tool or provide exclusion criteria.

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