Skip to main content
Glama

tap_element

Taps a native element by its label, such as "Allow" on a permission popup, checking system UI first and then the app.

Instructions

Tap a native element by its label, for example "Allow" on a permission popup. Looks in the system UI first, then in the app.

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": {
      "device": "<device>",
      "label": "<label>"
    },
    "name": "tap_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoApp id: Android package, Apple bundle identifier; on "mac" the bundle identifier or app name (required there)
labelYes
deviceYesDevice id (or exact name) from the devices tool
screenshotAfterMsNoIf set, wait this many milliseconds after the action and return a screenshot too

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It usefully discloses the search order (system UI before app), which explains why it can hit permission dialogs, but it says nothing about what happens when the label is not found (error vs. timeout), whether it waits/retries for the element, or that tapping may trigger destructive UI actions.

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?

Two short sentences, zero filler, with the core action front-loaded and the search-order nuance following immediately. Nothing is repeated from the schema.

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 4-parameter tool with no annotations and no output schema, the definition covers what it does and where it looks, but leaves the agent guessing about failure behavior, return values, and how to obtain a valid label. Adequate but with clear gaps.

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

Parameters3/5

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

Schema description coverage is 75%, so most parameters are already documented in the schema. The description only adds an illustrative label value; it says nothing about `app` scoping (e.g., whether it restricts the search to the app vs. system UI) or when `screenshotAfterMs` is worth using.

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), resource (native element), and selection method (by label), with a concrete example ("Allow" on a permission popup). It implicitly distinguishes itself from the sibling `tap` (coordinate-based) and `ui_elements` by framing the target as a labeled native element, though it never names those siblings explicitly.

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 permission-popup example and the 'system UI first, then the app' note imply the intended use case (dismissing OS dialogs, hitting labeled controls). However, there is no explicit when-not guidance, no mention of using `ui_elements` to discover labels or `tap` when no label exists, and no prerequisites stated.

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