Skip to main content
Glama

tap_text

Taps a UI element by its visible text or resource-id, optionally exact match and index selection, to automate Android screen interactions.

Instructions

Find an element by its visible text (or resource-id) and tap its centre.

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": "tap_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesVisible text or content-desc
exactNoExact text match
indexNoWhich match to tap when several exist (0-based)
resource_idNoOptional resource-id filter

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/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 does disclose one meaningful behavior: the tap lands at the element's centre, so the hit point is deterministic. It says nothing about what happens when no element matches, whether it waits for the element to appear, or whether an ambiguous match fails versus picking the first one.

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?

One sentence, front-loaded with the locating mechanism and closing with the action and hit point. There is no filler and nothing an agent must read twice.

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 simple four-parameter tap tool with no annotations and no output schema, the description covers the essential mechanism and result. The main gap is failure and ambiguity behavior, which matters for an automation tool that may silently miss a target.

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 100%, so the schema already explains all four parameters and the baseline is 3. The description adds only the framing that resource-id is an alternate way to locate an element, which sits slightly in tension with the schema marking 'text' as required.

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 gives a specific verb and resource: find an element by visible text or resource-id and tap its centre. An agent can immediately tell this is the text-addressable alternative to a coordinate-based tap. It stops short of naming that sibling, so the differentiation is inferable rather than explicit.

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: you reach for this when you know the element's label instead of its coordinates. There is no statement of when not to use it, no mention of falling back to coordinate taps when text matching fails, and no mention of long_press for long-press interactions.

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