Skip to main content
Glama

Swipe, scroll, drag, pinch

swipe_screen

Perform finger gestures on mobile app screens: swipe, scroll until an element appears, drag items, or pinch to zoom. Use it to navigate and interact with UI elements during app testing.

Instructions

Move a finger: swipe, scroll to an element, drag or pinch. direction: a swipe, from a target if given; up moves content up. until: swipes until that selector is on screen (maxSwipes, 10); x,y: which list. to: drags the target there, no flick; holdMs first lifts a row. scale: pinch, > 1 zooms in. pointers: free paths, one per finger, t in ms. exact: content moves distance and stops. In place: tap_screen. Returns the screen after.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "swipe_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
toNo
refNo
readNo
exactNo
scaleNo
untilNo
holdMsNo
distanceNo
pointersNo
selectorNo
directionNo
maxSwipesNo
durationMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.4

TDQS

A4/5.0
Behavior4/5

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

Beyond the non-destructive annotations, it discloses useful behavioral details: maxSwipes defaults to 10, drag has no flick, holdMs lifts a row, exact movement stops after distance, and the screen is returned afterward. It does not describe all side effects, but the annotations already lower that burden.

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?

The purpose is front-loaded and the remaining text is a dense, parameter-focused set of fragments with almost no wasted wording. Some fragments are cryptic, but the overall structure is efficient for a complex gesture tool.

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 complex 15-parameter gesture tool with no output schema, the description covers the main modes and return behavior reasonably well. It is still incomplete because important invocation details around read modes, ref/selector targeting, and durationMs are missing.

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?

With 0% schema description coverage across 15 parameters, the description explains many core parameters such as direction, until, maxSwipes, x/y, to, holdMs, scale, pointers, exact, and distance. However it omits key parameters like read, ref, top-level selector, and durationMs, and does not clarify target handling between ref and selector.

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

Purpose5/5

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

The description states a specific action set (swipe, scroll, drag, pinch) and distinguishes the tool from tap_screen by saying taps belong there. An agent can identify this as the gesture-movement tool without opening the schema.

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 maps each major mode to a parameter: direction for swipe, until for scrolling to an element, to for drag, scale for pinch, and pointers for multi-finger paths. It also names tap_screen as the alternative for in-place taps, though it does not explicitly state broader when-not-to-use conditions.

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