Skip to main content
Glama

tap_element

Locate an Android UI element by text, content description, or resource ID and tap its center. Enables automated taps without needing screen coordinates.

Instructions

Find an element by text/content-desc (substring, case-insensitive) or resource-id and tap its center

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
indexNoWhich match to tap if several
serialNoDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)
resource_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses matching semantics (substring, case-insensitive) and where the tap lands (element center), but is silent on failure behavior when nothing matches, whether it waits/retries for the element, and whether it scrolls to find off-screen elements.

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?

A single front-loaded sentence with no filler; the lookup criteria precede the action, which is the right ordering for an agent deciding whether it can use this tool.

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?

For a side-effecting UI interaction tool with no annotations and no output schema, the description covers the happy path only. Missing failure/ambiguity semantics (no match, multiple matches beyond the schema's `index` hint, off-screen elements) leave an agent guessing about edge cases.

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 coverage is 50%: `index` (match selector) and `serial` (device routing) are documented in the schema, while `text` and `resource_id` are bare. The description compensates for `text` by specifying substring/case-insensitive matching, but leaves `resource_id` matching semantics (exact vs substring) undefined and never explains that `text` and `resource_id` are alternative selectors.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair (find + tap), the resource (element), and the two lookup keys (text/content-desc or resource-id), plus the tap target (center). It implicitly separates itself from the coordinate-based `tap` sibling but never names it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this tool is chosen when it knows the element's text or resource-id rather than its coordinates, but the description never says when to prefer `tap`, `long_press`, or `ui_dump` instead, nor any prerequisite like the app already being on screen.

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