Skip to main content
Glama

Tap

tap

Performs a touch at physical pixel coordinates or on a UI node identified by text, content description, or resource ID on Android and iOS devices.

Instructions

Tap x, y in physical pixels, or the center of the node whose text or contentDesc (iOS: label or value) equals text, or whose resource id (iOS: identifier) matches id. An iPhone needs install_runner once.

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
xNo
yNo
idNoResource id, full or the part after :id/ (iOS: identifier).
textNoExact text or contentDesc (iOS: label or value), case-sensitive.
deviceNoId or name.
timeoutNoWith text or id: ms to keep reading the tree until the node appears; the call can run up to 6 s longer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • removedInput schema / properties / duration
      Removed value: -{
      -  "description": "Hold time in ms.",
      -  "type": "integer"
      -}
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: coordinates are interpreted as physical pixels (not logical points or percentages), and the timeout path can extend the call by up to 6 seconds. It does not say how a tap resolves when both coordinates and a node selector are given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both front-loaded with the action modes followed by the platform caveat; no filler. The first sentence is dense but every clause carries distinct targeting 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 6-parameter, zero-required-parameter tool with no output schema, the description covers targeting and the iOS prerequisite but leaves open what a bare call does, whether coordinates take precedence over text/id, and what evidence of success is returned. Adequate to invoke correctly in the common case, incomplete at the edges.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%; the description adds the key missing semantic that x/y are in physical pixels, which the schema leaves bare. For id and text it mostly restates what the schema already documents (partial id matching, exact case-sensitive text), so the gain is concentrated on the coordinate pair.

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) plus three mutually exclusive targeting modes: physical pixel coordinates, exact text/contentDesc, or resource id. It's clear what the tool does, though it never names the adjacent siblings (long_press, double_tap) that an agent might confuse it with.

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

Usage Guidelines4/5

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

The description effectively explains the three invocation strategies an agent can pick from and adds a real prerequisite ('An iPhone needs install_runner once'), which tells the agent when this call will fail. It stops short of stating exclusions (e.g., use double_tap/long_press for repeated or held touches) or what happens if multiple selectors are supplied.

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