drag
Performs a mouse drag from one screen point to another for drawing, selecting, or moving sliders. Sends intermediate motion steps so drag targets register, and releases the button even if a step fails.
Instructions
Drag (mouse-down → move → up) from (x1,y1) to (x2,y2) — for drawing, selecting, sliders.
Returns {"ok", "action", "instance", "detail", "steps"}. steps (default 10, 1–100) is the
number of intermediate motion events: canvases, sliders and drag-and-drop targets usually
need a few to register the drag (1 = jump straight to the end point). The button is released
even if a motion step fails (a stuck button would turn every later click into a drag).
observe/settle_ms: see click(). Fails (isError) if the instance is down or either point
is off-screen.
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 | ||
| x2 | Yes | ||
| y1 | Yes | ||
| y2 | Yes | ||
| steps | No | ||
| button | No | ||
| observe | No | none | |
| instance | No | ||
| settle_ms | No | ||
| observe_region | No |