Skip to main content
Glama

phone_tap_element

Destructive

Tap a UI element by its index from a phone_elements snapshot, safely guarding against stale references so a changed screen refuses the tap instead of hitting a different 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; a small change on the same screen (clock, badge, a flipped switch) still finds the row by kind, identifier, label and enclosing rows, while another page, a new alert, or look-alikes it cannot tell apart refuse with nothing sent, 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "element": "<element>",
      "snapshot": "<snapshot>"
    },
    "name": "phone_tap_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
elementYesZero-based element index from `phone_elements`.
observeNoDefault true: reply with the settled screen (delta since your last look, or the full tree); false = bare action, fastest.
instanceNodaemon instance name
snapshotYesSnapshot token from the same `phone_elements` response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.29.2
    • removedInput schema / description
      Removed value: -"Parameters for [`phone_tap_element`]."
  2. Changed5 schema fields changedv0.29.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / instance / description
      Previous value: -"Installed local instance name, such as i13 or default. Omit to use the configured daemon. No fallback on failure."New value: +"daemon instance name"
    • removedInput schema / properties / observe / default
      Removed value: -null
    • changedInput schema / properties / observe / description
      Previous value: -"Default true: return what the screen settled to (as on phone_tap).\n`false` for the fastest bare action."New value: +"Default true: reply with the settled screen (delta since your last\nlook, or the full tree); false = bare action, fastest."
    • changedInput schema / properties / observe / type
      Previous value: -[
      -  "boolean",
      -  "null"
      -]New value: +"boolean"
  3. Changed1 schema field changedv0.27.34
    • addedInput schema / properties / element / minimum
      Added value: +0
  4. 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"
      +}
  5. First observedv0.21.0

TDQS

A4/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the daemon re-reads the tree, re-resolves the row by kind, identifier, label and enclosing rows, tolerates benign same-screen drift (clock, badge, flipped switch), and fails closed with nothing sent on ambiguity. That fail-safe atomicity and the ephemeral-snapshot warning are exactly the sort of context the destructiveHint annotation cannot convey.

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?

Front-loaded with the action and addressing scheme, then failure semantics and a warning. The middle sentence is long and slightly convoluted ('look-alikes it cannot tell apart refuse with nothing sent'), but every sentence carries information.

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?

For a mutating tap with no output schema, the definition covers the risky parts: re-resolution, ambiguity refusal, and stale-reference handling; the observe parameter's schema description covers what comes back. It does not mention settling/wait behavior or permission requirements, which leaves a minor gap.

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%, so the baseline is 3, but the description adds real meaning: the snapshot's provenance and lifespan, plus how the element index should be selected by reading identifier/kind/label/state fields. The observe/instance parameters are left entirely to 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?

States a concrete verb and resource ('Tap one element') plus the exact addressing mechanism (zero-based index plus snapshot token from the same phone_elements response), which implicitly separates it from label- or coordinate-based tap siblings. It stops short of naming an alternative tool outright, so an agent must infer the boundary rather than read it.

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 precondition is clear — the index and snapshot must come from the same phone_elements response — and it explains how to pick an index ('Use identifier/kind/label/state fields'). However, it never says when to prefer this over phone_tap_label or phone_tap, nor any exclusion beyond the described refusal case.

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