Skip to main content
Glama

tap_element

Locate a UI element by text, resource ID, or class name and tap its center to interact with it.

Instructions

Find a UI element by text, resource ID, or class name and tap its center

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoVisible text or content-desc; regex full-match — use .* for partial, e.g. 'Sign.*'
device_idNoTarget device ID. If omitted, uses the default device.
class_nameNoIgnored in M1; reserved for a future class selector
resource_idNoBare resource-id, e.g. login_button; regex full-match

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.8.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden, but it only discloses that the tap lands at the element's center. It does not mention what happens when multiple elements match, what occurs if no element is found, or that class_name is ignored in M1. The mention of class_name as a lookup method is potentially misleading given the schema says it is ignored.

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 a single front-loaded sentence that conveys the core action, target, and selector types without wasted words. Every phrase contributes to understanding what the tool does.

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

Completeness2/5

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

For a UI action with no output schema and no annotations, the description is too thin to be fully actionable. It lacks guidance on alternative tool selection, behavior on multiple/no matches, and the fact that class_name is not currently functional in M1. The rich parameter schema helps, but the surrounding context is still incomplete.

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%, so each parameter is already documented. The description adds a useful summary of the selector parameters but no new meaning beyond what the schema provides, and it omits parameter-specific notes like regex matching and the deprecated/ignored nature of class_name.

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?

The description states a clear verb-target relationship: find a UI element by text, resource ID, or class name, then tap its center. This is specific enough to distinguish it from coordinate-based taps, though it does not explicitly name sibling tools or explain how it differs from them.

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

Usage Guidelines2/5

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

No guidance is given for when to prefer tap_element over alternatives like tap_xy, long_press, or find_element. The description implies useful selection criteria (text/resource-ID/class-name) but provides no exclusions, prerequisites, or conditions for when this tool is the right choice.

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