Skip to main content
Glama

tap

Locate a UI element by selector, activate its center, and wait for the screen to settle before returning an updated snapshot for verification.

Instructions

Find an element by selector and tap its center. Waits for the screen to settle, then returns a fresh snapshot — annotated if it never settled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoBare resource-id (Compose testTag), regex full-match
textNoVisible text or content-desc, regex full-match
indexNoPick the Nth match (0-based)
optionalNoIf true, a miss does not error
device_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.8.0

TDQS

A3.6/5.0
Behavior4/5

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

There are no annotations, so the description carries the behavioral burden. It usefully discloses that the tool waits for the screen to settle, returns a fresh snapshot, and annotates the snapshot if it never settled. It does not cover error behavior or edge cases, but the optional parameter partially signals miss handling.

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 efficient sentence with the primary action front-loaded. Every phrase adds value, and there is no redundant or filler content.

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 tool with optional parameters and no output schema, the description adequately explains core behavior and return value. It is missing explicit sibling differentiation and failure-mode details, but it is sufficient for basic invocation.

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 high at 80%, and parameter descriptions already explain id, text, index, and optional. The description adds only general selector context and does not clarify the undocumented device_id parameter or add meaningful semantics beyond the schema.

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 identifies a specific verb and resource: find an element by selector and tap its center. It also communicates a clear postcondition (returning a fresh snapshot). However, it does not explicitly distinguish itself from the similarly named sibling tap_element.

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?

The description explains what the tool does but gives no guidance about when to use it versus alternatives like tap_xy, tap_element, or long_press. An agent is left to infer selection from tool names rather than from explicit usage context.

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