esp_drag
Drags the mouse between two verified screen positions with a chosen button, duration, modifiers, and tolerance; releases the button if the end point is missed.
Instructions
Drag with a mouse button: moves to the start and verifies it (no press on a miss), presses, moves to the end over duration_ms, verifies the end with the button still down, then releases. A miss at the end still releases and fails with position_mismatch. Physical screen pixels.
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>",
"control_id": "<control_id>"
},
"name": "esp_drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_x | Yes | End X. | |
| to_y | Yes | End Y. | |
| button | No | Default left. | |
| coords | No | "screen" (default): physical screen pixels. "screenshot": pixels of the image from esp_screenshot named by screenshot_id. | |
| from_x | Yes | Start X (physical screen px). The button is pressed only when the cursor lands there. | |
| from_y | Yes | Start Y. | |
| modifiers | No | Keys held during the drag, e.g. ["shift"]; released in the same call. | |
| control_id | Yes | From esp_control begin. | |
| request_id | No | Optional idempotency key: repeating a call with the same request_id within 5 min returns the first receipt (also an uncertain one) without running the action again. | |
| duration_ms | No | Time of the movement between the ends, 0..10000 ms (default 300). | |
| tolerance_px | No | Allowed distance from both ends in px per axis (default 1). | |
| screenshot_id | No | With coords "screenshot": the screenshot_id the coordinates refer to. |