Skip to main content
Glama

swipe

Simulate a drag gesture from start to end coordinates on Android or iOS devices to automate scrolling, navigation, or other touch interactions; optionally set gesture duration.

Instructions

Swipe from (x1, y1) to (x2, y2)

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
x1YesStart X coordinate
x2YesEnd X coordinate
y1YesStart Y coordinate
y2YesEnd Y coordinate
duration_msNoDuration in milliseconds (default: 1000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it discloses nothing about coordinate units (pixels vs normalized), whether the gesture blocks until completion, the default duration, or what happens on out-of-bounds coordinates. Only the minimal motion semantic is conveyed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short fragment with zero filler, but the brevity comes at the cost of under-specification rather than good front-loading of necessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a gesture-automation tool with no annotations and no output schema, the description should at minimum clarify the coordinate system and mention that duration controls speed. Those omissions leave real ambiguity about how to invoke it correctly.

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 schema already documents all five parameters including the duration default of 1000ms. The description adds no meaning beyond those structured fields, which is the baseline case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a concrete gesture (a swipe) with explicit endpoints, so the action is identifiable. However, 'Swipe from (x1, y1) to (x2, y2)' is largely a restatement of the parameter names and does nothing to distinguish it from the sibling tap or tap_text gestures beyond the bare verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use a swipe versus tap/tap_text/home, no prerequisite context, and no exclusions. The agent must infer usage entirely from the one-line summary.

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