Skip to main content
Glama

tap_on_text

Tap a UI element by its visible text or content-description. Locates labeled buttons or rows and taps their center, with options for exact matching and accessibility clicks for native views.

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. 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).
Behavior4/5

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

No annotations are present, so the description carries the full burden. It discloses that the tool runs describe_ui internally and prefers a clickable match, which implies a hierarchy read and potential performance cost. It also flags via_accessibility as EXPERIMENTAL and mentions the prerequisite bridge installation. It does not discuss safety (e.g., mutation of UI state) or error behavior if element not found, but overall transparency is good.

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 concise: 3-4 sentences with front-loaded purpose. Each sentence earns its place—purpose, internal behavior, usage tip for exact match, and advanced accessibility option. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, no output schema, and no annotations, the description explains the core mechanism and provides usage guidance. However, it does not describe the return value (e.g., success indicator, error message if element not found) or what happens when the element is missing. This is a gap for completeness.

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 descriptions cover all 5 parameters (100% coverage). The description adds value beyond the schema by explaining the internal strategy (describe_ui, prefers clickable), providing usage guidance for 'partial' (exact match to avoid wrong item), and contextualizing 'via_accessibility' (when coordinate tap fails, requiring the adb-mcp bridge). This extra context improves parameter understanding.

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 finds an element by visible text or content-description and taps its center. It distinguishes itself from coordinate-based taps ('without computing coordinates yourself') and is positioned as a one-shot way to press labeled buttons. This differentiates it from sibling tools like 'tap' (coordinate-based) and 'tap_element' (likely selector-based).

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 description explains when to use the tool (for labelled buttons/rows without coordinate math) and gives specific advice: use exact match (partial=false) when labels overlap to avoid wrong items; use via_accessibility=true when coordinate taps fail on Compose/RN NativeTabs. It does not explicitly compare to all alternatives (e.g., tap_element) or state when not to use, but provides clear context for key scenarios.

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