swipe
Simulates a touch gesture from one screen point to another; set duration ≥1000ms to perform a drag.
Instructions
Swipe/drag from one screen point to another. A slow swipe (duration >= 1000) acts like a drag.
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": {
"from_x": "<from_x>",
"from_y": "<from_y>",
"to_x": "<to_x>",
"to_y": "<to_y>"
},
"name": "swipe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_x | Yes | ||
| to_y | Yes | ||
| from_x | Yes | ||
| from_y | Yes | ||
| serial | No | adb serial; optional when exactly one device is connected | |
| observe | No | What to return after the action: changes (default: only what changed since you last saw the screen, full tree on a new screen), ui (full tree), screenshot, both (tree + screenshot), none | changes |
| settle_ms | No | Wait before observing | |
| duration_ms | No |