Skip to main content
Glama

phone_tap_element

Destructive

Tap a specific UI element by index and snapshot token; the action is rejected if the screen changed, preventing stale references from hitting the wrong control.

Instructions

Tap one element by its zero-based index and snapshot token from the SAME phone_elements response. The daemon re-reads the tree and refuses the action if the UI changed, so a stale element reference cannot silently tap a different control. Use identifier/kind/label/state fields to choose the index. Snapshot refs are ephemeral: never persist them in a flow.

Input Schema

NameRequiredDescriptionDefault
elementYesZero-based element index from `phone_elements`.
observeNoDefault true: return what the screen settled to (as on phone_tap). `false` for the fastest bare action.
instanceNoInstalled local instance name, such as i13 or default. Omit to use the configured daemon. No fallback on failure.
snapshotYesSnapshot token from the same `phone_elements` response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.27.34
    • addedInput schema / properties / element / minimum
      Added value: +0
  2. Changed1 schema field changedv0.27.3
    • addedInput schema / properties / instance
      Added value: +{
      +  "description": "Installed local instance name, such as i13 or default. Omit to use the configured daemon. No fallback on failure.",
      +  "type": "string"
      +}
  3. First observedv0.21.0

TDQS

A4.1/5.0
Behavior4/5

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

It explains that the daemon re-reads the tree and refuses the action if the UI changed, which adds safety context beyond the annotations. It also notes that refs are ephemeral. It does not explain why the tool is annotated destructiveHint=true, or what the refusal error looks like.

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?

Four sentences, each earning its place. The purpose is front-loaded, followed by the safety behavior, selection guidance and a persistence warning.

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?

It covers the prerequisite workflow, the staleness protection and the ephemeral refs, which is solid for a UI action tool. The return value is described only in the observe parameter. Sibling differentiation among the tap tools is missing.

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 100%. The description adds that the index should be chosen from the identifier/kind/label/state fields, and that element and snapshot must come from the same response. This is meaningful guidance 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?

It names a specific action (tap one element by index plus snapshot token) and ties it to phone_elements. It does not say how this differs from the siblings phone_tap (coordinates?) or phone_tap_label, so an agent choosing among the three tap tools must infer the distinction.

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?

It gives a clear prerequisite: the index and token must come from the SAME phone_elements response. It also says how to pick the index and warns never to persist snapshot refs in a flow. It does not say when to prefer phone_tap_label or phone_tap over this tool.

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