swipe
Control Android or iOS screens by performing directional or coordinate-based touch gestures, including drag mode and optional post-action UI capture.
Instructions
Swipe on the device screen. Provide explicit coordinates or a direction (up/down/left/right) to auto-compute from screen center.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| drag | No | Press, move and release instead of flicking — for reordering lists and dragging items. Android only. Default: false | |
| end_x | No | End X coordinate in native device resolution. Required if direction is not set. | |
| end_y | No | End Y coordinate in native device resolution. Required if direction is not set. | |
| observe | No | Capture screen state after the action. "on_change" returns the first tree that differs — catches a toast a fixed delay would miss. Default: none | |
| start_x | No | Start X coordinate in native device resolution. Required if direction is not set. | |
| start_y | No | Start Y coordinate in native device resolution. Required if direction is not set. | |
| platform | No | Target platform. Inferred if omitted. | |
| device_id | No | Device ID. Omit for the connected device. | |
| direction | No | Swipe direction. Auto-computes coordinates from screen center. Overrides explicit coordinates. | |
| duration_ms | No | Duration of the swipe in milliseconds. Default: 300 | |
| observe_delay_ms | No | Ms to wait before observing. Default: 500 | |
| screenshot_scale | No | If coordinates come from a scaled screenshot, provide the scale factor (e.g. 0.5). Coordinates will be auto-converted to native resolution. | |
| observe_stabilize | No | Wait for the UI to settle instead of a fixed delay. Default: false |