Skip to main content
Glama

Swipe or scroll

android_swipe

Performs swipe gestures between two points to scroll lists, dismiss items, or drag elements on an Android device.

Instructions

Swipe between two points. Used for scrolling, dismissing, and drag gestures.

To scroll a list down (revealing content further down), swipe from a lower y to a higher one — the finger moves up.

Args:

  • x1, y1 (number): start point in pixels

  • x2, y2 (number): end point in pixels

  • duration_ms (number): gesture duration; longer is a drag, shorter is a fling (default: 300)

  • serial (string, optional): target device

Returns: { "from": [number, number], "to": [number, number], "durationMs": number, "serial": string }

Examples:

  • Use when: scrolling a list down -> x1=540, y1=1600, x2=540, y2=600

  • Use when: dragging an item -> duration_ms=1000

  • Don't use when: a single tap is enough (use android_tap)

Error Handling:

  • A swipe that is too fast to register is the usual cause of "nothing happened"; raise duration_ms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x1YesStart x in pixels.
x2YesEnd x in pixels.
y1YesStart y in pixels.
y2YesEnd y in pixels.
serialNoDevice serial from android_list_devices. Optional when exactly one device is connected; required when several are.
duration_msNoGesture duration in milliseconds.
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description adds valuable behavioral context: direction semantics ('To scroll a list down... swipe from a lower y to a higher one'), duration effects ('longer is a drag, shorter is a fling'), and error handling ('A swipe that is too fast to register... raise duration_ms'). This fully discloses observable behavior without contradicting annotations.

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?

The description is front-loaded with a one-sentence summary, then organized into clear sections (Args, Returns, Examples, Error Handling). Every sentence earns its place; no fluff. It is longer than minimal but appropriately structured for the tool's complexity.

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?

Given the tool's gesture complexity, the description covers: the action, param semantics, return format ('Returns: { "from": ... }'), example usage, an explicit alternative, and error handling. No output schema exists, so the description correctly carries the return-value documentation.

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 meaning beyond the schema by explaining the direction semantics (y-axis movement), the nuance of duration (drag vs. fling), and a concrete example mapping parameters to use cases. It does not merely repeat the schema definitions.

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 names a specific verb ('swipe') and resource action ('between two points'), and immediately clarifies its purpose with 'Used for scrolling, dismissing, and drag gestures.' It also distinguishes from the sibling `android_tap` explicitly, saying 'Don't use when: a single tap is enough (use android_tap).'

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance with concrete examples: 'Use when: scrolling a list down -> x1=540, y1=1600, x2=540, y2=600' and 'Use when: dragging an item -> duration_ms=1000'. Also states a clear exclusion: 'Don't use when: a single tap is enough (use android_tap).'

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

Install Server

Other Tools

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/jjs03111/android-build-mcp'

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