Drag
input_dragDrag the mouse between two screen coordinates using interpolated steps, pressing at the start and releasing at the end. Supports left, right, or middle buttons for automation tasks.
Instructions
Press the mouse button at one point, drag through interpolated intermediate points, and release at another. Requires Accessibility permission.
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": {
"fromX": "<fromX>",
"fromY": "<fromY>",
"toX": "<toX>",
"toY": "<toY>"
},
"name": "input_drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toX | Yes | ||
| toY | Yes | ||
| fromX | Yes | ||
| fromY | Yes | ||
| steps | No | Number of interpolated intermediate points. Defaults to 20. | |
| button | No | Defaults to left. | |
| durationMs | No | Total drag duration in milliseconds. Defaults to 200. |