Skip to main content
Glama

previewapk_tap

Taps an Android screen by resolution-independent coordinates or by a stable element reference from a snapshot, failing safely if the UI changed to avoid wrong taps.

Instructions

Tap the screen. Either coordinates (0..1 fractions of the screen, resolution-independent) or a ref from previewapk_observe: pass ref + snapshot_id and the server re-finds that exact element on the current screen first — if it moved or changed, the call fails with stale_snapshot instead of tapping the wrong thing. Requires an agent-driven session.

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

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
refNoelement number from a previewapk_observe snapshot
deviceNo
snapshot_idNothe snapshot_id that ref belongs to

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.1.1
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "element number from a previewapk_observe snapshot",
      +  "type": "integer"
      +}
    • addedInput schema / properties / snapshot_id
      Added value: +{
      +  "description": "the snapshot_id that ref belongs to",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "x",
      -  "y"
      -]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the re-find-before-tap safety behavior and the concrete failure mode ('fails with stale_snapshot instead of tapping the wrong thing'), plus the session precondition. Gaps remain on return values and on what happens if both coordinate and ref arguments are supplied.

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?

Tightly front-loaded: the action first, then the two targeting modes, then the safety guarantee. Every clause contributes information an agent needs; nothing is filler.

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?

No annotations and no output schema, so the description must cover behavior alone, and it covers failure modes and preconditions. However, with 0 required parameters it never says what happens if neither coordinates nor a ref are supplied, and the 'device' parameter is unaddressed in both schema and description.

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?

Adds substantial meaning beyond the 40%-covered schema: x/y are defined as 0..1 resolution-independent fractions (the schema says only 'number'), and ref/snapshot_id are explained as a coupled pair tied to a previewapk_observe snapshot. The 'device' parameter and the precedence between coordinate mode and ref mode are left unexplained.

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?

Opens with a specific verb+resource ('Tap the screen') and immediately enumerates the two supported targeting modes, so an agent knows exactly what the tool does. It implicitly contrasts with the ref-based flow of previewapk_observe but never names siblings like previewapk_tap_text or previewapk_act, so the differentiation is not fully explicit.

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?

Clearly states the two usage paths (normalized coordinates vs. ref+snapshot_id from previewapk_observe) and names the sibling that produces the ref. It also gives the gating condition 'Requires an agent-driven session', which tells the agent when the call is not available, but it does not exclude or compare against tap_text/act.

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