拖拽
browser_dragDrag an element onto another element or by pixel offsets to move sliders, reorder drag-and-drop lists, and position canvas items.
Instructions
Drag an element by ref to another element (toRef) or by a relative pixel offset (dx, dy). Useful for sliders, drag-and-drop sortable lists, and canvas boards.
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": {
"ref": "<ref>"
},
"name": "browser_drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dx | No | Relative horizontal offset in pixels (e.g. 150) | |
| dy | No | Relative vertical offset in pixels (e.g. -50) | |
| ref | Yes | Source element ref to drag from | |
| tabId | No | Tab id (default: active tab) | |
| toRef | No | Target element ref to drop onto | |
| snapshot | No | Return an incremental snapshot after the action (default true) |