Skip to main content
Glama

tap

Clicks an Android UI element using its latest UI-tree index, visible text/description, resource ID, or physical screen coordinates.

Instructions

Tap an element by 1-based index, text/desc, or resource-id from the latest ui_tree, or at physical screen coordinates (x, y).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tap"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoPhysical X coordinate in pixels.
yNoPhysical Y coordinate in pixels.
idNoResource ID (short or full) of the node from the latest ui_tree.
textNoVisible text or content-desc of the node from the latest ui_tree.
indexNo1-based node index from the latest ui_tree (e.g. 1, 2).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the freshness requirement ('latest ui_tree') and the coordinate mode, but is silent on precedence when several optional selectors are supplied, on behavior when the element is not found, and on any wait/retry semantics.

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?

A single front-loaded sentence that enumerates the selector options with zero filler; nothing could be removed without losing information.

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 tool with no annotations, no output schema, and all five parameters optional, the description omits what happens with zero selectors, which selector wins on conflict, and expected failure behavior. What is present is accurate but insufficient to fully de-risk 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 description coverage is 100%, so every parameter is already documented with type and meaning. The description's summary of the selector families largely restates the schema ('text/desc' mirrors text and content-desc) and adds no format or precedence detail beyond it, making baseline 3 correct.

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?

States a specific verb (tap) and lists the four ways to identify the target: 1-based index, text/content-desc, resource-id, or physical (x, y). An agent immediately knows the operation and its selector modes, though it doesn't explicitly contrast itself with interactors like swipe or type_text.

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?

The phrase 'from the latest ui_tree' implicitly signals the prerequisite that ui_tree must be called first, and coordinate tapping is offered as an alternative path. However, there is no explicit when-to-use versus swipe/type_text/key, and no guidance on which selector form to prefer.

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