Skip to main content
Glama

gesture-swipe

Execute swipe or drag gestures on iOS Simulators and Android Emulators to scroll lists, dismiss modals, drag elements, or navigate pages. Control momentum for deterministic scroll distances.

Instructions

Execute a smooth swipe / drag touch gesture between two points on the device (iOS simulator or physical device, or Android emulator). All from/to positions are normalized 0.0–1.0 (fractions of screen width/height, not pixels), same as gesture-tap. Generates interpolated Move events for a natural feel (~60fps). Swipe up (fromY > toY) to scroll content down. Use when you need to scroll a list, dismiss a modal, drag an element, or navigate between pages. Not supported on Chromium — use gesture-scroll there instead. Physical iOS: an edge gesture (back-swipe) needs fromX 0 exactly; durationMs sets drag speed, not time; momentum:false only rests 300ms at the end and does not damp. Pass momentum:false for a momentum-free swipe that lands where the finger lifts (little to no fling at the 300 default), when you need a deterministic scroll distance; it needs durationMs >= 150 and is rejected below that, a shorter ease-out leaving the OS too little wall clock to read the deceleration as a stop. At 150 it lands short of the lift point instead, and 2 of 47 runs still flung backwards. A plain swipe takes any duration up to 10000ms and is delivered as close to the speed it was authored as a 16ms frame allows: below ~32ms the whole travel lands in one or two frames, which the OS flings as hard as it flings anything. Returns { swiped: true, timestampMs }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the simulator-server / emulator backend is not reachable for the given device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toXYesEnd x: normalized 0.0–1.0 (not pixels; same as tap)
toYYesEnd y: normalized 0.0–1.0 (not pixels; same as tap)
udidYesTarget device id from `list-devices` (iOS UDID or Android serial).
fromXYesStart x: normalized 0.0–1.0 (not pixels; same as tap)
fromYYesStart y: normalized 0.0–1.0 (not pixels; same as tap)
settleNoRetired: renamed to `momentum` with the opposite sense. Pass `momentum: false` for what `settle: true` meant; `settle: false` was the default, so drop the key.
momentumNoWhether the swipe releases with momentum; default true (a natural flinging swipe). Pass false for a momentum-free swipe at the default durationMs: the finger decelerates into the end point (ease-out) so the OS reads ~0 release velocity and applies little to no fling. Use false for scroll-to-element loops. momentum: false needs durationMs >= 150 and is rejected below it: a shorter ease-out gives the OS velocity fit too little wall clock to read the deceleration as a stop, and it flings harder than a plain swipe instead (on Android, backwards). At 150 itself the swipe lands short of where the finger stopped, and 2 of 47 runs still flung backwards.
durationMsNoTotal gesture duration in milliseconds (default 300, at most 10000 - the gesture holds a finger down for exactly this long)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv0.24.0
    • changedInput schema / properties / durationMs / description
      Previous value: -"Total gesture duration in milliseconds (default 300)"New value: +"Total gesture duration in milliseconds (default 300, at most 10000 - the gesture holds a finger down for exactly this long)"
    • addedInput schema / properties / durationMs / maximum
      Added value: +10000
    • addedInput schema / properties / momentum
      Added value: +{
      +  "description": "Whether the swipe releases with momentum; default true (a natural flinging swipe). Pass false for a momentum-free swipe at the default durationMs: the finger decelerates into the end point (ease-out) so the OS reads ~0 release velocity and applies little to no fling. Use false for scroll-to-element loops. momentum: false needs durationMs >= 150 and is rejected below it: a shorter ease-out gives the OS velocity fit too little wall clock to read the deceleration as a stop, and it flings harder than a plain swipe instead (on Android, backwards). At 150 itself the swipe lands short of where the finger stopped, and 2 of 47 runs still flung backwards.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / settle / description
      Previous value: -"Momentum-free swipe: decelerate into the end point (ease-out) so the OS reads ~0 release velocity and applies little to no fling. Use for scroll-to-element loops; default false (a natural flinging swipe)."New value: +"Retired: renamed to `momentum` with the opposite sense. Pass `momentum: false` for what `settle: true` meant; `settle: false` was the default, so drop the key."
    • addedInput schema / properties / settle / not
      Added value: +{}
    • removedInput schema / properties / settle / type
      Removed value: -"boolean"
  2. Changed1 schema field changedv0.16.0
    • addedInput schema / properties / settle
      Added value: +{
      +  "description": "Momentum-free swipe: decelerate into the end point (ease-out) so the OS reads ~0 release velocity and applies little to no fling. Use for scroll-to-element loops; default false (a natural flinging swipe).",
      +  "type": "boolean"
      +}
  3. First observedv0.15.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and handles it thoroughly: it discloses interpolation at ~60fps, direction semantics, physical iOS quirks, momentum behavior, return shape, failure conditions, and the reactivated field. This goes far beyond a basic 'performs a swipe' statement and gives an agent concrete expectations for execution and results.

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?

The description is front-loaded with the core operation, but it quickly becomes a dense, run-on block of edge cases and empirical observations (e.g., '2 of 47 runs still flung backwards'). It also repeats much of the schema's momentum/duration text nearly verbatim, which adds length without new value. Every sentence carries some information, but the structure is not clean and the redundancy hurts conciseness.

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

Completeness5/5

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

For a complex gesture tool with no annotations and no output schema, the description is remarkably complete: it explains platform support, coordinate normalization, return value, failure behavior, timing constraints, momentum semantics, and physical-device caveats. An agent has enough context to invoke the tool correctly and interpret its result in most scenarios.

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; the description adds genuine extra meaning for parameters, notably that fromY > toY means swipe up to scroll down, that physical iOS edge gestures require fromX exactly 0, and that momentum:false requires durationMs >= 150. Much of the momentum and duration detail is redundant with the schema, but the unique insights push it above baseline.

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 clearly states a specific verb and resource: executing a smooth swipe/drag touch gesture between two normalized points. It names use cases (scroll, dismiss modal, navigate) and even an alternative for Chromium, but it does not fully differentiate from the sibling gesture-drag, which the description also claims to cover with 'drag an element.'

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?

It explicitly lists when to use the tool ('Use when you need to scroll a list, dismiss a modal, drag an element, or navigate between pages') and gives a clear when-not with an alternative ('Not supported on Chromium — use gesture-scroll there instead'). However, it does not clarify when gesture-drag or gesture-tap should be preferred, leaving some sibling differentiation to inference.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-mansion/argent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server