Skip to main content
Glama

tap_on_text

Tap any labeled Android element by text or content-description, no coordinate math needed. Normalizes punctuation to match dialog text and offers accessibility-click fallback when taps fail.

Instructions

Find an element by its visible text or content-description and tap its center — the one-shot way to press a labelled button/row without computing coordinates yourself. Runs describe_ui internally and prefers a clickable match. Matching folds typographic punctuation to ASCII, so a typed "Don't allow" finds the system dialog's "Don’t allow" (U+2019) and an en/em dash matches a hyphen. Use exact match (partial=false) to avoid hitting the wrong item when labels overlap. 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
textYesText or content-description to find.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
partialNoSubstring match instead of exact. Default true.
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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and reveals substantial non-obvious behavior: it runs describe_ui internally, prefers a clickable match, normalizes typographic punctuation to ASCII, defaults to a coordinate tap, and can switch to a real accessibility click requiring a one-time bridge install. This goes well beyond what the schema alone would convey.

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 front-loaded with the core purpose and each subsequent sentence adds a distinct, valuable behavior or condition: internal describe_ui usage, punctuation normalization, exact-match guidance, and the accessibility fallback. There is no filler or redundant restating of the tool name.

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 5-parameter tool with no annotations and no output schema, the description covers selection criteria, matching semantics, and a failure-recovery path very thoroughly. It does not explicitly describe return values or no-match error behavior, but that is a minor gap given the otherwise complete operational guidance.

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 already 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining the punctuation-folding behavior for text matching and by giving the specific scenario where partial=false matters. via_accessibility is also contextualized with a concrete failure case, while serial and verify_change are adequately left to their schema descriptions.

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 exactly what the tool does: find an element by visible text or content-description and tap its center. It calls itself 'the one-shot way' to press a labelled button or row without computing coordinates, which clearly distinguishes it from coordinate-based taps and related sibling tools like tap.

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?

Gives clear, actionable guidance: use partial=false when labels overlap to avoid hitting the wrong item, and use via_accessibility=true when a coordinate tap lands but nothing happens. It does not explicitly enumerate when to prefer sibling tools like tap_element, but the coordinate-tap contrast and fallback conditions make the intended usage context clear.

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