Skip to main content
Glama

Tap

tap

Clicks a single coordinate in true device pixels to interact with Android UI elements, using fresh center values from describe_ui and optional hit/change checks to diagnose missed actions.

Instructions

Tap a single coordinate in true device pixels. Use a center value from describe_ui. If a tap seems to do nothing, the coordinate is almost always stale/misscaled — re-run describe_ui and use a fresh center. Prefer tap_on_text when you know the element's label. When a tap lands but nothing happens, pass identify=true (reports which element the coordinate hit — or that it hit a non-clickable wrapper / no reported element) and/or verify_change=true (reports whether the UI actually changed) to tell the failure modes apart. Note: some native views (e.g. Compose/RN NativeTabs bars) don't respond to coordinate taps at all — use tap_on_text/tap_element with via_accessibility=true there (EXPERIMENTAL, requires adb-mcp bridge install once per device).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "x": "<x>",
      "y": "<y>"
    },
    "name": "tap"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesX coordinate in true device pixels.
yYesY coordinate in true device pixels.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
identifyNoAlso report which UI element the coordinate lands in (a hit test against the hierarchy read just before tapping). Use when a tap seems to do nothing: it tells you whether the coordinate hit the element you expected, a non-clickable wrapper, or no reported element at all (an unseen overlay). Costs one extra hierarchy read.
verify_changeNoAlso report whether the UI hierarchy changed after the tap (ui_changed: true/false). Costs two extra hierarchy reads (~2-3s); use when a tap silently doing nothing would send you down the wrong path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations, which only declare non-destructive and closed-world. It discloses the dominant failure mode (stale/misscaled coordinates), the fact that some Compose/RN native views never respond to coordinate taps at all, and the one-time `adb-mcp bridge install` prerequisite for the accessibility fallback. It stops short of describing return payloads in detail, which is the only notable gap.

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?

Front-loads the action, then the sourcing rule, then the fallbacks and diagnostics, so the most important information comes first. It is dense and slightly overstuffed in the closing sentence (native views plus the experimental bridge install), but no sentence is filler.

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?

There is no output schema, and the description compensates by saying what identify reports (hit element, non-clickable wrapper, or nothing) and what verify_change reports (ui_changed: true/false). For a simple 5-parameter tap tool, nothing an agent needs to call or interpret it correctly is missing.

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%, so the baseline is 3, but the description adds decision-level meaning: it frames identify and verify_change as a paired diagnostic for distinguishing failure modes rather than as standalone flags. The cost hints (extra hierarchy reads) are already in the schema, so the added value is mostly the workflow framing.

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?

States a specific verb and resource ('Tap a single coordinate in true device pixels') and immediately separates itself from tap_on_text and tap_element by the coordinate-vs-label distinction. An agent can route between tap, tap_on_text, and tap_element from this sentence alone.

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?

Gives explicit when-to-use and when-to-use-something-else: prefer tap_on_text when the element label is known, and use tap_on_text/tap_element with via_accessibility for native views that ignore coordinate taps. It also names the diagnostic escalation path (identify/verify_change) for the specific failure case of a silent no-op.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.