Swipe
swipePerform swipe gestures on Android devices for scrolling or dismissing UI elements. Specify start and end points in pixels or screen percentages, with configurable duration and device selection.
Instructions
Swipe from one point to another (scrolling, dismissing). For drag-and-drop use drag instead. Instead of pixels you can pass screen percentages (0-1): safer when estimating positions from a screenshot image.
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 |
|---|---|---|---|
| x1 | No | Start X in device pixels | |
| x2 | No | End X in device pixels | |
| y1 | No | Start Y in device pixels | |
| y2 | No | End Y in device pixels | |
| x1Pct | No | Start X as fraction of width (0-1) | |
| x2Pct | No | End X as fraction of width (0-1) | |
| y1Pct | No | Start Y as fraction of height (0-1) | |
| y2Pct | No | End Y as fraction of height (0-1) | |
| serial | No | Device serial (defaults to session or the only device) | |
| durationMs | No | Swipe duration (default 300ms) |