Drag On Screen
mobile_drag_on_screenDrag a finger between coordinates or element refs on a mobile screen to move sliders, reorder lists, or perform drag-and-drop actions.
Instructions
Drag one finger from one point to another, e.g. to move a slider, reorder a list or drag and drop. Each end is either x,y coordinates or an element by its ref (e.g. "@e5") from the latest mobile_list_elements_on_screen result. Prefer ref when the element is listed.
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>"
},
"name": "mobile_drag_on_screen"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | No | The x coordinate to start the drag from, in pixels. Required unless fromRef is given | |
| x2 | No | The x coordinate to end the drag at, in pixels. Required unless toRef is given | |
| y1 | No | The y coordinate to start the drag from, in pixels. Required unless fromRef is given | |
| y2 | No | The y coordinate to end the drag at, in pixels. Required unless toRef is given | |
| hold | No | How long the finger stays down before it moves, in milliseconds. Use it (e.g. 500) to pick up an item that would otherwise scroll. Defaults to 0 | |
| toRef | No | Element ref to end the drag at, e.g. "@e7". Takes precedence over x2,y2 | |
| device | Yes | The device identifier to use. Use mobile_list_available_devices to find which devices are available to you. | |
| fromRef | No | Element ref to start the drag from, e.g. "@e5". Takes precedence over x1,y1 |