Skip to main content
Glama

tap_element

Tap an Android UI element by its resource id, using exact match to avoid incorrect hits and optionally dispatching an accessibility click for elements that ignore coordinate taps.

Instructions

Find an element by resource_id and tap its center — the id-addressed sibling of tap_on_text, for elements with no visible label. Runs describe_ui internally (filter=all, so even unlabeled wrapper nodes are findable) and re-resolves the element right before tapping, narrowing the window where a stale coordinate lands on an overlay (e.g. an Expo dev-menu bubble) the a11y tree never reported. Use exact match (partial=false) to avoid hitting the wrong item when ids overlap; verify_change reports whether the tap had any visible effect. If a coordinate tap lands but nothing happens (e.g. a Compose/RN NativeTabs bar), pass via_accessibility=true to dispatch a real accessibility click instead (EXPERIMENTAL — see that param's description).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
partialNoSubstring match instead of exact. Default true.
resource_idYesResource id to find and tap, e.g. "com.example.app:id/submit_button" or just "submit_button" (matches by substring by default).
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.
via_accessibilityNoEXPERIMENTAL. Dispatch a real accessibility click (AccessibilityNodeInfo.performAction(ACTION_CLICK)) through the adb-mcp accessibility bridge instead of a coordinate tap — reaches native views (Compose/RN NativeTabs bars, some overlays) that ignore input tap entirely. Requires the bridge installed once per device: run "adb-mcp bridge install" on the host first, or this returns a clear error telling you to. Default false (coordinate tap).
Behavior5/5

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

With no annotations provided, the description carries full responsibility and delivers comprehensive behavioral details: it internally runs describe_ui with filter=all to find even hidden nodes, re-resolves the element to avoid stale coordinates landing on overlays, warns about unreported overlay windows, and explains the experimental nature of the accessibility click fallback. No contradictions with annotations (none present).

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 tightly written: it opens with a clear purpose, then each subsequent sentence adds distinct operational context without redundancy. Despite its length, every sentence earns its place—unlike many verbose descriptions, this one packs only essential information in a logical flow.

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?

Given the tool's five parameters, lack of output schema, and no annotations, the description covers nearly every aspect: purpose, usage guidelines, internal behavior, parameter semantics, and error conditions. The only minor gap is the lack of an explicit description of the return value, though the mention of verify_change hints at its presence. This is a high bar, and the description comes very close to complete.

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% with each parameter described, meeting the baseline of 3. The description adds value by contextualizing parameter choices, such as recommending exact match to avoid ambiguous clicks and explaining when to use verify_change or via_accessibility, going beyond the schema's basic type and 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 first sentence clearly states the action: 'Find an element by resource_id and tap its center'. It distinguishes itself from the sibling 'tap_on_text' by explicitly noting it is for elements with no visible label, providing immediate context on when this tool is appropriate.

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 exact vs partial match ('Use exact match (partial=false) to avoid hitting the wrong item when ids overlap'), explains the purpose of 'verify_change' to detect silent failures, and advises using 'via_accessibility' when coordinate taps fail on certain native views. It also mentions the prerequisite of installing the adb-mcp bridge, leaving no ambiguity about usage.

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/iksnerd/adb-mcp'

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