Skip to main content
Glama

Swipe

swipe

Performs a swipe gesture between two physical pixel coordinates on Android or iOS devices, enabling scrolling, dragging, and navigation during UI automation.

Instructions

Swipe from x1, y1 to x2, y2 in physical pixels. An iPhone needs install_runner once.

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": {
      "x1": "<x1>",
      "y1": "<y1>",
      "x2": "<x2>",
      "y2": "<y2>"
    },
    "name": "swipe"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1Yes
x2Yes
y1Yes
y2Yes
deviceNoId or name.
durationNoms from start to end. Default 300.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so the mutation/safety profile is covered structurally. The description adds the valuable detail that coordinates are in physical rather than logical pixels and surfaces the install_runner prerequisite, but says nothing about what the swipe does to app state or how failures behave.

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 with no waste, and the coordinate semantics are front-loaded so the agent can construct the call immediately. The prerequisite is tacked on second, which is the right order.

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 simple gesture action with no output schema and annotations covering safety, the essential calling information — coordinate space, required points, default duration via schema, and the iOS prerequisite — is present. Only the post-call behavior/return value is left unstated, which is minor.

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 only 33%, and the four required coordinate parameters have no schema descriptions at all; the description compensates by defining them as physical-pixel start and end points. Device and duration are covered by the schema, so all six parameters end up interpretable.

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 (swipe) and the exact resource/geometry (from x1,y1 to x2,y2 in physical pixels), which distinguishes it from the sibling 'tap' gesture tool. It is clear what the tool does, though it does not explicitly contrast itself with 'tap' or 'key'.

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?

'An iPhone needs install_runner once' gives a real prerequisite for one platform, but there is no guidance on when to swipe versus tap, nor any note on choosing a duration. Usage is implied by the tool name rather than explained.

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