swipe
Drag a finger between two coordinates on a virtual device screen to simulate touch gestures on Android, iOS, or macOS.
Instructions
Drag one finger from one position to another (a mouse drag on "mac").
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": {
"device": "<device>",
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "swipe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | Start, horizontal, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge | |
| x2 | Yes | End, horizontal, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge | |
| y1 | Yes | Start, vertical, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge | |
| y2 | Yes | End, vertical, as a fraction of the screenshot: 0 is the left / top edge, 1 the right / bottom edge | |
| app | No | App id: Android package, Apple bundle identifier; on "mac" the bundle identifier or app name (required there) | |
| device | Yes | Device id (or exact name) from the devices tool | |
| durationMs | No | How long the drag takes. Default 300 | |
| screenshotAfterMs | No | If set, wait this many milliseconds after the action and return a screenshot too |