Skip to main content
Glama

previewapk_tap_text

Taps a UI element by matching visible text (exact first, then substring) and resolves its center from the UI hierarchy; returns candidate matches instead of guessing when targets are ambiguous.

Instructions

Tap the element whose visible text matches (exact match preferred, else substring; use index to pick among matches). If several elements match at the same level and no index is given, the call returns an ambiguous_target result with the candidates instead of guessing. Resolves the element's center from the UI hierarchy — prefer this over coordinate taps whenever the target has text.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "previewapk_tap_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
indexNo
deviceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.1
    • removedInput schema / properties / index / default
      Removed value: -0
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses match precedence (exact before substring), the ambiguity behavior (returns ambiguous_target with candidates rather than guessing), and how the tap point is derived (element center from the UI hierarchy). It omits what happens on no-match and says nothing about device selection or permissions, which keeps it from a 5.

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?

Three dense sentences, front-loaded with the core action, then edge-case behavior, then the sibling preference. No filler and every clause adds decision-relevant information.

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

Completeness4/5

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

For a three-parameter UI action tool with no annotations and no output schema, the description covers matching, ambiguity, and tap-point resolution well enough to call safely. The unexplained `device` parameter and the undefined no-match outcome are the remaining gaps.

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 0%, so the description must compensate. It explains `text` semantics (exact preferred, else substring) and `index` (pick among matches), which is genuinely useful, but the `device` parameter is never mentioned, leaving one of three parameters undefined in both schema and description.

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 and target ('Tap the element whose visible text matches') and immediately contrasts with the sibling coordinate-tap tool, so an agent can pick correctly without opening any schema. The matching rule and ambiguity handling further pin down exactly what the tool does.

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?

Explicitly routes the agent: 'prefer this over coordinate taps whenever the target has text,' which names the alternative (previewapk_tap) and the condition that selects this tool. It also tells the agent to supply index when several elements match, covering the main decision point at call time.

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