Drag
dragPress, hold, move, and release between device-pixel coordinates to operate handles, long-press reorder lists, and drop targets that quick swipes skip.
Instructions
Press-hold-move-release drag from (x1,y1) to (x2,y2) in true device pixels (input draganddrop, Android 11+). Unlike swipe (which flings), this holds at the start first — use it for drag handles, long-press-to-reorder lists, and drag-and-drop targets a quick swipe skips.
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": "drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | Start X in true device pixels. | |
| x2 | Yes | End X in true device pixels. | |
| y1 | Yes | Start Y in true device pixels. | |
| y2 | Yes | End Y in true device pixels. | |
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| duration_ms | No | Drag duration in ms. Default 400. |