Skip to main content
Glama

swipe

Simulate touch gestures on Android devices by swiping between specified coordinates for UI testing and automation.

Instructions

Swipe from start to end coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_xYes
start_yYes
end_xYes
end_yYes
duration_msNo
device_serialNo

Implementation Reference

  • The primary handler for the 'swipe' tool. Executes ADB shell input swipe command with provided coordinates and duration. Registered via @mcp.tool() decorator which handles schema from type hints.
    @mcp.tool() def swipe( start_x: int, start_y: int, end_x: int, end_y: int, duration_ms: int = 300, device_serial: str | None = None ) -> str: """Swipe from start to end coordinates""" return run_adb([ "shell", "input", "swipe", str(start_x), str(start_y), str(end_x), str(end_y), str(duration_ms) ], device_serial)

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/rahulkr/r_adb_mcp_server'

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