Skip to Content
ReferenceToolspointer_drag

pointer_drag

Press, drag along a path of image pixels (or between two elements) and release. The button is released even when the call fails or the link drops.

Arguments

Over MCP every tool also takes machine: the machine’s name or id, optional when only one machine is online.

NameTypeRequiredMeaning
button`“left”“right”“middle”`
displayintegerno
duration_msintegernoTotal time of the drag (default 400, at most 10000).
from_elementstringnoOr two elements: from and to.
modifiers`“shift”“ctrl”“alt”
observe`“none”“ui”“image”`
pathobject[]noPoints to follow, in image pixels, at least two. The button goes down at the first and up at the last. Default: [].
to_elementstringno

Result

NameTypeRequiredMeaning
audit_idstringyesId of the audit line on the machine.
dispatchedbooleanyes
foreground_changedbooleanyesThe frontmost app or window changed because of the action.
observationobjectno
settled_msintegeryesHow long the screen took to go quiet after the action, in milliseconds.

Examples

{ "name": "pointer_drag", "arguments": { "machine": "<machine>" } }

Limits

The call times out after 30 s (timed_out). Available since version 0.0.2. A refused or failed call returns one of the error codes.