Skip to main content
Glama

swipe

Simulate a drag gesture on a running Android or iOS device using normalized screen coordinates from 0.0 to 1.0 and an optional duration.

Instructions

Swipe on a running device. Coordinates are ratios from 0.0 to 1.0 relative to the screen (0,0 = top-left, 1,1 = bottom-right).

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

Input Schema

NameRequiredDescriptionDefault
x1YesStart X ratio (0.0 = left, 1.0 = right)
x2YesEnd X ratio
y1YesStart Y ratio (0.0 = top, 1.0 = bottom)
y2YesEnd Y ratio
deviceYesDevice ID or name
platformYesTarget platform
duration_msNoSwipe duration in milliseconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the ratio coordinate system and the running-device prerequisite, but says nothing about duration defaults, whether the gesture is blocking, what happens on out-of-range input, or what is returned. Adequate but leaves meaningful behavioral gaps for a mutation/input tool.

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?

Two short sentences, front-loaded with the action and followed by the one piece of information an agent is most likely to get wrong (coordinate ratios). No filler or repetition.

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?

For a 7-parameter input tool with full schema coverage and no output schema, the core invocation semantics are covered. The definition omits gesture behavior details such as duration effects and whether the call blocks until the swipe completes, which an agent would reasonably want before invoking.

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 all seven parameters including the ratio bounds and duration_ms default are already documented in the schema. The description restates the ratio convention (0,0 top-left to 1,1 bottom-right) without adding new semantics beyond that, so baseline 3 applies.

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 states a specific verb and resource ("Swipe on a running device") and immediately clarifies the coordinate convention, which separates it from a point gesture like tap. It does not explicitly differentiate from siblings such as press_key or tap, but the swipe semantics are unambiguous from the verb.

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?

"On a running device" implies the prerequisite that the device must already be started via start_device, which is useful routing context. However, there is no explicit when-to-use/when-not guidance vs. tap or press_key, and nothing about what to do if the device is not running.

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