computer_drag
Simulates a drag gesture on a mobile device by pressing at a start coordinate and releasing at an end coordinate, enabling swipes and selections via the Devicebase API.
Instructions
Press the left button at one point, move to another, and release.
Args: serialno: The computer device serialno, from list_devices. x1: Start X coordinate in screen pixels. y1: Start Y coordinate in screen pixels. x2: End X coordinate in screen pixels. y2: End Y coordinate in screen pixels.
Returns: JSON response from the API.
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": {
"serialno": "<serialno>",
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "computer_drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | ||
| x2 | Yes | ||
| y1 | Yes | ||
| y2 | Yes | ||
| serialno | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |