Skip to main content
Glama
clivejefferies

mobile-debug-mcp

tap_element

Taps a resolved UI element by its elementId. Returns execution status; verify outcome separately.

Instructions

Purpose: Tap a previously resolved UI element using its elementId.

Inputs:

  • elementId: a resolved UI element identifier returned by wait_for_ui

Output Structure:

  • action_id: unique timestamp-based action identifier

  • timestamp: ISO 8601 timestamp for the action attempt

  • action_type: "tap_element"

  • lifecycle_state: post-dispatch lifecycle state (pending_verification or failed)

  • source_module: runtime source of the action envelope

  • target.selector: original target handle ({ elementId })

  • target.resolved: minimal resolved element info used for the tap

  • success: true when the tap was dispatched

  • failure_code: present when success=false

  • retryable: present when failure_code exists

  • ui_fingerprint_before/ui_fingerprint_after: optional fingerprints captured around the action

Recommended Usage:

  1. Resolve the target with wait_for_ui or another deterministic resolver

  2. Call tap_element

  3. If needed, wait for transition using wait_for_*

  4. Verify outcome using expect_*

    • use expect_screen when navigation is expected

    • use expect_element_visible when the UI change is local

  5. If verification fails, inspect failure_code and follow the retry strategy below

Verification Guidance:

  • Follow RESOLVE → ACT → WAIT (if needed) → EXPECT

  • Prefer expect_screen for navigation or modal transitions

  • Prefer expect_element_visible when the tap should reveal or update a specific element

  • wait_for_* may be used for resolution and synchronization, but not as the final verification step when an applicable expect_* tool exists

  • Do not treat tap_element.success as outcome success; it only means the tap was executed

Failure Handling:

  • STALE_REFERENCE → re-resolve the element, then retry

  • ELEMENT_NOT_INTERACTABLE → wait or refine the target, then retry

  • UNKNOWN → capture a snapshot and stop

This tool reports execution success only. Verification must be done with a separate expect_* tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementIdYesA unique element identifier returned by wait_for_ui
Behavior5/5

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

No annotations provided, so description carries full burden. It details output structure, failure codes (STALE_REFERENCE, ELEMENT_NOT_INTERACTABLE, UNKNOWN), retry logic, and clarifies that success only means execution, not outcome. Very transparent.

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?

Well-structured with sections (Purpose, Inputs, Output Structure, Recommended Usage, etc.). It is relatively long but every sentence adds value given the tool's complexity.

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?

Comprehensive coverage: usage flow, verification guidance, failure handling, and output details. Without output schema, the description compensates fully by listing expected fields.

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

Parameters4/5

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

Schema coverage is 100% (1 parameter, elementId). The description adds meaning by explaining how to obtain elementId from wait_for_ui and its purpose, going beyond the schema's brief description.

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: 'Tap a previously resolved UI element using its elementId.' This is specific and distinguishes it from siblings like generic 'tap' by requiring a resolved elementId from wait_for_ui.

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 'Recommended Usage' section provides a clear workflow (RESOLVE → ACT → WAIT → EXPECT) and when to use expect_screen vs expect_element_visible. However, it does not explicitly exclude usage scenarios compared to siblings like tap.

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/clivejefferies/mobile-debug-tools'

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