Skip to main content
Glama

ios_tap_element

Tap iOS app elements using accessibility labels or partial text matches to automate testing and interaction workflows.

Instructions

Tap an element by its accessibility label. Requires IDB (brew install idb-companion). TIP: Consider using ocr_screenshot first - it returns ready-to-use tap coordinates for all visible text and works without requiring accessibility labels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoExact accessibility label to match (e.g., 'Home', 'Settings')
labelContainsNoPartial label match, case-insensitive (e.g., 'Circular' matches 'Circulars, 3, 12 total')
indexNoIf multiple elements match, tap the nth one (0-indexed, default: 0)
durationNoOptional tap duration in seconds (for long press)
udidNoOptional simulator UDID. Uses booted simulator if not specified.
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral requirements: it states the prerequisite 'Requires IDB (brew install idb-companion)' and explains the alternative approach's advantage. However, it doesn't mention error conditions, timeout behavior, or what happens if no matching element is found.

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?

The description is perfectly front-loaded with the core purpose, followed by prerequisite information, then alternative usage guidance. Every sentence earns its place: the first states what the tool does, the second provides essential setup information, and the third offers valuable comparative guidance.

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?

For a tool with no annotations and no output schema, the description does well by covering purpose, prerequisites, and alternatives. However, it doesn't describe what happens on success/failure or the return format. Given the 5 parameters and mutation nature (tapping implies interaction), more behavioral context would be beneficial.

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?

With 100% schema description coverage, the baseline is 3. The description doesn't add any parameter-specific information beyond what's already documented in the schema (which thoroughly describes all 5 parameters). No additional syntax, format, or constraint details are provided in the description text.

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 specific action ('Tap an element') and target ('by its accessibility label'), distinguishing it from sibling tools like ios_tap (which likely taps by coordinates) and ios_find_element (which finds but doesn't tap). The verb+resource combination is precise and unambiguous.

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 alternatives: it directly recommends 'Consider using ocr_screenshot first' as an alternative approach that 'works without requiring accessibility labels.' This creates clear decision criteria between two different interaction methods.

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/igorzheludkov/metro-logs-mcp'

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