Skip to main content
Glama

drag

Drag elements via native mouse events for CSS-driven interactions like sliders, resize handles, and reorderable lists. Specify source and target by selector or coordinates.

Instructions

Drag an element via native CDP mouse events (mousePressed → interpolated mouseMoved with buttons:1 → mouseReleased). Works for CSS-driven drag: slider thumbs, resize handles, text selection, mouse-based reorder lists (e.g. SortableJS in mouse mode). NOT suitable for HTML5 Drag&Drop API (draggable=true elements with dragstart/drop listeners, React DnD HTML5Backend, Vuedraggable, ng2-dnd) — that path needs Input.dispatchDragEvent which this tool does not implement. Parameters: from_ref/from_selector OR from_x+from_y as source, to_ref/to_selector OR to_x+to_y as target. steps (default 10, min 5) controls mouseMoved granularity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_refNoA11y-Tree source ref (e.g. 'e5')
from_selectorNoCSS selector for source element
from_xNoSource X coord (viewport px) — alternative zu Ref
from_yNoSource Y coord (viewport px) — alternative zu Ref
to_refNoA11y-Tree target ref (e.g. 'e7')
to_selectorNoCSS selector for target element
to_xNoTarget X coord (viewport px)
to_yNoTarget Y coord (viewport px)
stepsNoAnzahl mouseMoved-Events zwischen press und release (min 5 fuer HTML5-dragover)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses the exact event sequence (mousePressed → interpolated mouseMoved → mouseReleased) and parameter group constraints (from_ref/from_selector OR from_x+from_y). No annotations exist, so description carries full burden, and it does so well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is front-loaded with mechanism and use cases; each sentence adds information. Slightly dense but not overly verbose. Could be slightly more structured, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For 9 parameters, no output schema, and no annotations, the description is quite thorough. Explains event mechanism, parameter groups, and limitations. Minor gap: no mention of return value or error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers 100% of parameters, but description adds value by explaining the two coordinate/selector groups and clarifying the 'steps' default and minimum. This context helps understanding beyond schema types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('Drag', 'mouse events') and lists concrete use cases (slider thumbs, resize handles, text selection), clearly distinguishing from HTML5 Drag&Drop API. It leaves no ambiguity about the tool's function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States when to use (CSS-driven drag) and explicitly when NOT to use (HTML5 Drag&Drop). Could mention alternative tool for HTML5 Drag&Drop, but the exclusion is clear and helpful.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Silbercue/public-browser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server