Skip to main content
Glama

Tap Element

android_tap_element

Locate a UI element by selector (text, resource id, class, etc.) and tap its center, with automatic wait for visibility up to 5 seconds. More reliable than coordinate taps for dynamic layouts.

Instructions

Find a UI element by selector and tap its center. More reliable than coordinate taps for dynamic layouts. Waits for the element to appear (default 5s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoMatch by exact visible text
indexNoWhich match to tap when multiple elements match (0-based). Defaults to 0.
deviceNoDevice id (serial or host:port). Optional -- when omitted, uses ANDROID_MCP_DEVICE env or auto-selects the connected device (physical devices preferred over emulators).
timeoutNoMax seconds to wait for the element. Defaults to 5.
classNameNoMatch by class name, e.g. 'android.widget.Button' or just 'Button'
resourceIdNoMatch by resource id. Short ids like 'btn_login' are auto-expanded using the foreground app package
contentDescNoMatch by accessibility label / content description (substring, case-insensitive)
textContainsNoMatch by substring of visible text (case-insensitive)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses waiting behavior (default 5s timeout) but does not explain failure behavior (e.g., exception on timeout, whether it scrolls, or if any side effects occur). For a tap action, this is adequate but could be more transparent.

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 two sentences long, front-loaded with the core action, and every sentence adds value. No unnecessary words or redundancy.

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?

The tool has 8 parameters but all are well-documented in the schema. The description does not explain selector priority (e.g., text vs resourceId) or return value. For a simple tap action, it is mostly complete but missing some context on selector combination logic.

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

Parameters3/5

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

Schema description coverage is 100% and each parameter has a clear description. The description adds value by mentioning the default timeout, but otherwise does not provide additional parameter semantics beyond the schema. Baseline 3 applies.

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 a UI element by selector and taps its center. It distinguishes from coordinate taps, which is a sibling tool (android_tap). The verb 'tap' and resource 'UI element' are specific.

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 notes it is more reliable than coordinate taps for dynamic layouts and mentions waiting behavior (default 5s). It implies when to use, but does not explicitly state when not to use or name alternatives directly. Sibling android_tap exists but is not cross-referenced.

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/qalvinahmad/android-mcp'

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