Skip to main content
Glama

Robot Actions — Remote Device Control

Device two finger swipe

device_two_finger_swipe

Two-finger swipe from (x1,y1) to (x2,y2) on an Android device — a two-finger scroll/pan. Both fingers travel the vector in parallel, offset perpendicular to it so one never runs through the other. Use where a one-finger swipe does the wrong thing, e.g. tilting a map or scrolling a view that pans with one finger. Coordinates are PHYSICAL pixels.Pass input="hid" to require the virtual touchscreen: the gesture then reaches the app as real kernel input and fails loudly instead of silently falling back to injected input. That strict path used to be device_uhid_two_finger_swipe, which stays callable under its old name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x1YesStart X
x2YesEnd X
y1YesStart Y
y2YesEnd Y
gapNoPixels between the two contacts (default: 120)
udidYesDevice serial number (UDID)
inputNoInput path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly.
durationNoGesture duration in ms (default: 400)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."New value: +"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."
  2. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."New value: +"Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly."
  3. Changed1 schema field changed
    • addedInput schema / properties / input
      Added value: +{
      +  "description": "Input path. 'auto' (default) prefers the virtual touchscreen and falls back to injected input. 'hid' requires the virtual touchscreen and fails if the device does not provide one — use it when the gesture must be real kernel input or must fail loudly.",
      +  "enum": [
      +    "auto",
      +    "hid"
      +  ],
      +  "type": "string"
      +}
  4. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly=false, destructive=false), and the description adds genuinely new behavior: both fingers travel the vector offset perpendicular so they never overlap, coordinates are physical pixels, and the 'hid' path 'fails loudly instead of silently falling back to injected input.' The failure semantics are the most valuable disclosure. It stops short of documenting duration/gap defaults or return values.

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 gesture definition, then usage, then the input-path caveat. Dense but mostly earning its place; the input='hid' explanation is somewhat redundant with the schema field description and the legacy-name note is a minor tangent.

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-ish gesture tool with no output schema, the description covers geometry, coordinate units, usage conditions and the strict-input failure mode. The main gap is that gap/duration defaults are left to the schema, but that is acceptable given 100% schema coverage.

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 meaning the schema lacks: coordinates are explicitly PHYSICAL pixels, and the gap parameter's role (perpendicular offset between contacts) is explained. The input='hid' explanation largely duplicates the schema description.

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 and resource ('two-finger swipe from (x1,y1) to (x2,y2) on an Android device') and clarifies it is a scroll/pan gesture. It distinguishes itself from the one-finger swipe and from two-finger tap siblings by describing the parallel-offset finger geometry.

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 an explicit when-to-use rule: 'Use where a one-finger swipe does the wrong thing, e.g. tilting a map or scrolling a view that pans with one finger.' It also says when to pass input='hid'. It does not, however, compare against other multi-touch siblings like device_gesture_path or device_pinch.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources