Skip to main content
Glama
CT-mao

uitree-local

by CT-mao

tap_element

Taps an element using its accessibility bounds, selecting a random point inside (excluding margin) to prevent identical repeated taps. Get bounds from get_screen_state.

Instructions

Taps an element identified by its accessibility bounds. The tap point is chosen randomly inside the bounds after excluding margin pixels on each edge (center fallback for small elements), so repeated taps never land on identical pixels. Get bounds from get_screen_state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boundsYes[left, top, right, bottom],来自 get_screen_state 节点的 boundsInScreen。
marginNoExclude this many pixels from each edge (default 4).
verifyNo复查屏幕树确认变更生效 (default true).
verify_poll_msNo轮询树的时间间隔毫秒 (default 300).
verify_timeout_msNo等待变更生效的超时毫秒 (default 3000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 full burden and does disclose meaningful non-obvious behavior: the tap point is randomized within the bounds, margin is excluded on each edge, and small elements fall back to center. It does not cover failure behavior (e.g., element not found) or what the tool returns, which leaves some gaps for a mutation tool.

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, front-loaded with the action and immediately following with the mechanics and the bounds source. No filler or restatement of the name.

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 5-param mutation tool with no annotations and no output schema, the description covers the core mechanic and bounds source well. It stops short of describing the verify/poll behavior's purpose or return values, which the schema only partially compensates for.

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 coverage is 100%, so the schema already documents all five parameters including margin, verify, and the timeout/poll defaults. The description's margin explanation ('excluding margin pixels on each edge') largely restates the schema rather than adding new meaning, so the baseline 3 is appropriate.

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?

States a specific verb ('Taps') and resource ('element identified by its accessibility bounds'), which cleanly separates it from the coordinate-based `tap` and the `long_press`/`long_press_element` siblings. An agent can tell what this does without opening the schema.

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?

Gives one concrete prerequisite ('Get bounds from get_screen_state'), which is genuinely useful routing guidance. However, it never states when to prefer this over `tap` (coordinate-based) or `long_press_element`, and offers no exclusions or failure conditions.

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