Swipe
adb_swipeSwipe between coordinates or long-press by holding one point on Android over ADB, with optional activity/UI verification to confirm the gesture.
Instructions
Swipe from (x1,y1) to (x2,y2) over duration_ms (default 300). The same point at both ends with duration_ms >= 800 is a long-press. coords and verify work as in adb_tap and both endpoints share one coordinate space; with verify="ui", an "unchanged" result on a swipe usually means the end of a scrollable list. On a TV box without a touchscreen, move the focus with adb_key DPAD_* instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "adb_swipe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | Start X in pixels, in the space chosen by coords. | |
| x2 | Yes | End X in pixels. | |
| y1 | Yes | Start Y in pixels. | |
| y2 | Yes | End Y in pixels. | |
| coords | No | Coordinate space for BOTH endpoints, default "screen". See adb_tap for the "screenshot" semantics and its 120s TTL. | |
| serial | No | Device serial from adb_devices. Optional when exactly one device is connected. | |
| verify | No | See adb_tap. For a swipe, "ui" reporting "unchanged" usually means you hit the end of a scrollable list rather than that nothing happened. | |
| duration_ms | No | Duration in ms, default 300. |