Skip to main content
Glama

ACTION_CLICK

Clicks an Android UI target by pixel coordinates, visible text, or resource-id through accessibility, using region or occurrence filters to avoid selecting duplicate labels.

Instructions

点击:按坐标、界面文字或 resource-id 点击目标(需无障碍)。输出:click_success。同一文字可能多处出现(多个「确定」「发送」):用 region 限定区域或 occurrence 取第 N 个,避免点错。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
regionNo仅文字/id 匹配:限定目标中心所在区域,top/bottom/left/right/center 或归一化 "x1,y1,x2,y2"(如 "0,0.5,1,1"=下半屏);解析不了则不限定
targetYes"x,y" 像素坐标;或界面文字(不区分大小写的子串匹配);或 "id:包名:id/xxx" 按 resource-id 匹配。支持 ${var}
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
offset_xNo仅文字/id 匹配:点击点相对目标中心的水平偏移像素(默认 0)
offset_yNo仅文字/id 匹配:点击点相对目标中心的垂直偏移像素(向下为正)(默认 0)
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
occurrenceNo仅文字/id 匹配:region 过滤后取第几个(屏幕从上到下,0 起;0=第一个可见的);越界直接失败(默认 0)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description does real work by disclosing the accessibility dependency and the click_success output variable. It does not cover what a failed or ambiguous click looks like, whether it waits for the element, or that out-of-range occurrence fails (that lives only in the schema). Solid but incomplete for a mutation tool with zero annotation coverage.

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 targeting modes, then the disambiguation warning — good ordering. Slightly redundant ending: '输出:click_success' and '结果以变量快照 JSON 返回' restate the same return channel, and there is a stray doubled period.

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 an 8-parameter mutation tool with no output schema and no annotations, the description covers the essentials: the three input modes, the multi-match pitfall, the permission requirement, and the success variable. Missing is any statement of failure behavior or the fact that offset/region only apply to text/id matching — though the schema fields do carry that.

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 100%, so the baseline is 3. The description does explain why region and occurrence exist (disambiguating repeated text) and that string parameters accept ${var} interpolation, but it adds no format or precedence detail beyond what the schema already documents.

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 (点击) and three concrete targeting modalities: pixel coordinates, on-screen text substring, or resource-id. An agent can tell this apart from neighbors like ACTION_LONG_PRESS or ACTION_FIND_ELEMENT by the matching mode, though no sibling is named explicitly.

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?

Gives a concrete usage rule that an agent would otherwise get wrong: when the same text appears multiple times (多个「确定」「发送」), use region to narrow or occurrence to pick the Nth. It also flags the accessibility prerequisite. It stops short of when-not guidance or routing to alternatives such as find-element then click.

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