Drag
dragMove items or adjust sliders by dragging from a source point to a target point. Supports coordinates relative to an element. Returns updated page snapshot.
Instructions
Drag from a source point to a target point (optionally relative to an element via eid). Use for reordering lists, moving sliders/handles, or manipulating canvas objects. Returns a fresh page snapshot with any resulting changes.
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": {
"source_x": "<source_x>",
"source_y": "<source_y>",
"target_x": "<target_x>",
"target_y": "<target_y>"
},
"name": "drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eid | No | Optional element ID. When provided, coordinates are relative to the element top-left corner. | |
| page_id | No | The ID of the page. | |
| source_x | Yes | X coordinate of the drag start point. | |
| source_y | Yes | Y coordinate of the drag start point. | |
| target_x | Yes | X coordinate of the drag end point. | |
| target_y | Yes | Y coordinate of the drag end point. | |
| modifiers | No | Modifier keys to hold during the drag (e.g., Shift for constrained rotation, Control for copy-drag). |