Skip to main content
Glama

Tap

tap

Press an Android screen element by snapshot reference, visible text or content description, or raw pixel coordinates; use screenshot dimensions to map image points to the device screen.

Instructions

Tap an element. Prefer ref from a snapshot(), or text/content_desc to tap by visible label. Falls back to raw x,y pixel coordinates: in device pixels, or, with image_width and image_height, in the pixels of a screenshot of that size (the API maps the point to the screen).

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
refNo
textNo
deviceNo
image_widthNo
content_descNo
image_heightNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are present, so the description carries the full burden. It does add genuinely useful behavioral context about coordinate interpretation (device pixels vs. screenshot-space pixels mapped to the screen), but it omits what happens when no element matches, how ambiguity between multiple matches is resolved, and that this mutates UI state.

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 tight sentences with the preferred path front-loaded and the coordinate-mapping caveat packed into a single parenthetical. No filler, and the most important guidance (use `ref`) comes first.

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?

The output schema exists, so return values needn't be described. Still, for an 8-parameter tool with zero schema descriptions and no annotations, leaving `device` undocumented and not addressing failure/no-match behavior leaves gaps an agent may hit in practice.

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 description coverage is 0%, so the description must compensate — and it largely does, explaining the meaning and interplay of `ref`, `text`, `content_desc`, `x`, `y`, `image_width`, and `image_height`, including that the image_* pair changes the coordinate space. Only `device` is left entirely unexplained.

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?

Opens with a specific verb+resource ("Tap an element") and immediately distinguishes itself from siblings like long_press, swipe, and scroll by being a discrete-tap action. The three targeting strategies name the exact inputs an agent would use.

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?

Explicitly states a preference order: "Prefer `ref` from a snapshot()", then `text`/`content_desc`, then raw coordinates as a fallback. This is clear routing guidance and names the snapshot() sibling that produces the preferred input, though it never says when to choose tap over long_press or scroll.

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