Skip to main content
Glama

drag

Simulate HTML5 or mouse drags from elements or coordinates to targets; auto-scrolls source and signals when no page reaction is detected.

Instructions

Drag a source onto a target: HTML5 drag-and-drop (draggable lists, SortableJS, React DnD) and mouse drags (sliders, canvas, resize handles). Scrolls the source into view; says when no page reaction was detected. Source: from_ref/from_selector or from_x+from_y; target: to_ref/to_selector or to_x+to_y.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_xNoTarget viewport X in px (with to_y)
to_yNoTarget viewport Y in px
stepsNoNative mouseMoved events between press and release; minimum 5
from_xNoSource viewport X in px (with from_y)
from_yNoSource viewport Y in px
to_refNoTarget element ref
from_refNoSource element ref
to_selectorNoTarget CSS selector
from_selectorNoSource CSS selector

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv2.10.5
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / from_ref / description
      Previous value: -"A11y-Tree source ref (e.g. 'e5')"New value: +"Source element ref"
    • changedInput schema / properties / from_selector / description
      Previous value: -"CSS selector for source element"New value: +"Source CSS selector"
    • changedInput schema / properties / from_x / description
      Previous value: -"Source X coord (viewport px) — alternative zu Ref"New value: +"Source viewport X in px (with from_y)"
    • changedInput schema / properties / from_y / description
      Previous value: -"Source Y coord (viewport px) — alternative zu Ref"New value: +"Source viewport Y in px"
    • changedInput schema / properties / steps / description
      Previous value: -"Anzahl mouseMoved-Events zwischen press und release (min 5 fuer HTML5-dragover)"New value: +"Native mouseMoved events between press and release; minimum 5"
    • changedInput schema / properties / to_ref / description
      Previous value: -"A11y-Tree target ref (e.g. 'e7')"New value: +"Target element ref"
    • changedInput schema / properties / to_selector / description
      Previous value: -"CSS selector for target element"New value: +"Target CSS selector"
    • changedInput schema / properties / to_x / description
      Previous value: -"Target X coord (viewport px)"New value: +"Target viewport X in px (with to_y)"
    • changedInput schema / properties / to_y / description
      Previous value: -"Target Y coord (viewport px)"New value: +"Target viewport Y in px"
  2. First observedv2.7.0

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses important behavioral traits: it scrolls the source into view and reports when no page reaction was detected. It also explains the two drag mechanisms (HTML5 vs mouse drags), which is valuable context beyond the schema. With no annotations provided, the description carries the burden and does a good job, though it could mention whether the operation is reversible or what side effects occur.

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

Conciseness5/5

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

The description is compact and information-dense. It front-loads the core action, then covers the two drag types, the scroll behavior, the no-reaction feedback, and the parameter grouping in just two sentences. Every sentence earns its place.

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 a tool with 9 optional parameters and no output schema, the description covers the key decision points: how to specify source/target, what drag types are supported, and what feedback to expect. It doesn't explain the return value or error cases, but the absence of an output schema and the clear parameter grouping make the description largely sufficient.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 9 parameters. The description adds the grouping of source (from_ref/from_selector or from_x+from_y) and target (to_ref/to_selector or to_x+to_y), which helps an agent understand the mutually exclusive alternatives. However, it doesn't add detail beyond that grouping, so a baseline 3 is appropriate.

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 clearly states the tool performs drag operations, enumerates the two supported drag types (HTML5 drag-and-drop and mouse drags), and gives concrete examples of each. It also distinguishes the source and target specification methods, making the tool's purpose unambiguous.

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?

The description provides clear context on when to use the tool (for draggable lists, sliders, canvas, resize handles) and explains the source/target specification options. It doesn't explicitly name alternative tools or state when not to use it, but the context is strong enough for an agent to select it appropriately among siblings.

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