Skip to main content
Glama

ACTION_SWIPE

Simulates a straight drag between two screen coordinates through Android accessibility, enabling workflows to perform gesture-based interactions with adjustable duration.

Instructions

滑动:从 (x1,y1) 直线滑到 (x2,y2)(需无障碍)。输出:swipe_success。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
x1Yes起点 x(像素)
x2Yes终点 x(像素)
y1Yes起点 y(像素)
y2Yes终点 y(像素)
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
durationNo滑动时长毫秒,限制 1-60000(默认 400)
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 reasonably well: it states the accessibility dependency, names the output variable (swipe_success), and explains that results are returned as a variable snapshot JSON — none of which is in the schema. It stops short of saying whether the call blocks until the gesture finishes or what a failed swipe returns.

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?

The text is compact and front-loaded: the gesture and its endpoints come first, followed by the prerequisite, output variable, interpolation rule, and return format. Each clause carries distinct information, though the trailing three clauses are terse enough that their ordering feels slightly list-like.

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 eight-parameter tool with no annotations and no output schema, the description covers the essentials: what the gesture is, the accessibility prerequisite, the result variable, and the return shape — partially compensating for the missing output schema. Gaps remain around blocking behavior and error semantics, but the fully-described schema picks up most of that slack.

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 all eight parameters are already documented, setting the baseline at 3. The one piece of added meaning is that string-typed parameters accept ${var} interpolation, which the schema's 'string|number' typing does not convey; the coordinate and timing semantics come entirely from 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?

The description gives a specific verb and resource — a straight-line swipe from (x1,y1) to (x2,y2) — which an agent can distinguish from taps or long-presses without opening the schema. It never names a sibling such as ACTION_CLICK or ACTION_LONG_PRESS, so the differentiation is inherent rather than explicit.

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?

It discloses the key prerequisite ('需无障碍' / requires accessibility service), which is genuine usage context. However, it gives no guidance on when to prefer a swipe over ACTION_CLICK or ACTION_LONG_PRESS, no when-not conditions, and no note on failure behavior beyond the 'require' parameter documented in the schema.

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