Skip to main content
Glama

previewapk_tap_text

Tap UI elements by visible text match. Resolves center from UI hierarchy for accurate taps, ideal when text is present.

Instructions

Tap the element whose visible text matches (exact match preferred, else substring; use index to pick among matches). Resolves the element's center from the UI hierarchy — prefer this over coordinate taps whenever the target has text.

Input Schema

NameRequiredDescriptionDefault
textYes
indexNo
deviceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose useful behavior: exact-then-substring matching precedence and that the tap point is derived from the element's center in the UI hierarchy rather than supplied coordinates. It omits what happens when nothing matches (error? timeout?), whether it waits for the element to appear, and whether permissions or an active session are required.

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?

Two tightly packed sentences with no filler; the matching rule and the index caveat come first, then the routing preference. Every clause carries information an agent needs.

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 mutation tool with no annotations, no output schema, and 0% schema coverage, the description covers selection but not outcome. An agent knows how the element is chosen but not what a failure looks like, whether a retry is needed, or what 'device' controls.

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 0%, so the description must compensate. It clarifies the 'text' parameter's matching semantics and the role of 'index' when multiple elements match, which is genuinely additive. However, the 'device' parameter is never mentioned, leaving a third of the parameters undocumented anywhere.

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 a specific verb (Tap) and a precise resource selector (the element whose visible text matches), including the matching rule (exact preferred, else substring). It also explicitly distinguishes itself from the coordinate-based sibling previewapk_tap, so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit routing rule: prefer this over coordinate taps whenever the target has text, which names the alternative tool and the condition that selects it. It also explains the disambiguation path when several elements match, via index.

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