Skip to main content
Glama

swipe

Drag a finger between two coordinates on a virtual device screen to simulate touch gestures on Android, iOS, or macOS.

Instructions

Drag one finger from one position to another (a mouse drag on "mac").

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

Input Schema

NameRequiredDescriptionDefault
x1YesStart, horizontal, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge
x2YesEnd, horizontal, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge
y1YesStart, vertical, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge
y2YesEnd, vertical, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge
appNoApp id: Android package, Apple bundle identifier; on "mac" the bundle identifier or app name (required there)
deviceYesDevice id (or exact name) from the devices tool
durationMsNoHow long the drag takes. Default 300
screenshotAfterMsNoIf set, wait this many milliseconds after the action and return a screenshot too

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3.1/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden, and it discloses very little beyond the mechanical action. It does clarify the mac equivalence to a mouse drag, which is genuinely non-obvious. However, it says nothing about whether the gesture requires the target app to be launched/foregrounded, how the drag is interpolated, whether a screenshot is returned, or what happens on failure.

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?

One tightly worded sentence with the action front-loaded and the mac clarification parenthetically appended. Nothing is wasted and nothing is buried.

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

Completeness3/5

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

The tool takes 8 parameters (5 required), has no annotations and no output schema, so the description should do more to explain setup prerequisites and outcomes. The schema fully documents coordinates and timing, which keeps this at a minimum-viable level rather than inadequate. Missing behavioral and prerequisite context holds it below 4.

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 coordinate fractions, durationMs, screenshotAfterMs, app, and device are all documented in the schema itself. The description adds no parameter meaning beyond that. Baseline 3 applies when the schema does all the work.

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 concrete verb+resource: 'Drag one finger from one position to another', which clearly identifies a touch-gesture action distinct from tap/key/pinch. It adds a useful cross-platform clarifier ('a mouse drag on "mac"') so the agent knows the same tool works on desktop. It does not name any sibling explicitly, so it falls short of the 5 bar for differentiation.

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 when-to-use or when-not-to-use guidance relative to alternatives such as tap_element or pinch. The agent must infer that a swipe is a continuous drag gesture while those siblings are discrete actions. No prerequisites (app in foreground, device state) are mentioned.

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