Skip to main content
Glama

Drag and drop

drag

Simulates real mouse movement from a start element or viewport point to an end target, enabling mouse-driven and HTML5 drag-and-drop interactions in browser automation.

Instructions

Drags from one element or point to another with real mouse events; supports both mouse-driven and HTML5 drag-and-drop.

Input Schema

NameRequiredDescriptionDefault
toNoEnd point in viewport CSS pixels (instead of toRef).
fromNoStart point in viewport CSS pixels (instead of fromRef).
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).
toRefNoElement ref from page_snapshot or find, e.g. "e12".
fromRefNoElement ref from page_snapshot or find, e.g. "e12".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the mutation profile is covered. The description adds real value by disclosing that it emits genuine mouse events and handles both mouse-driven and HTML5 drag semantics, which no structured field conveys. It stops short of failure behavior, event sequencing, or timing, so it is useful but not rich.

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?

A single sentence, front-loaded with the action and the endpoint duality, with no filler. Every clause (real mouse events, mouse-driven vs HTML5) carries information an agent cannot get elsewhere.

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

Completeness3/5

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

There is no output schema, so the description should convey what a successful or failed drag yields and roughly how long it takes. It covers the mechanics competently but omits outcome reporting and error conditions, leaving a gap for a mutating, open-world interaction tool.

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 both coordinate objects, both refs, and tabId are already documented. The description only restates the two endpoint modalities ('element or point') without adding format, precedence, or conflict-handling rules between coordinates and refs. Baseline 3 applies when the schema carries the semantics.

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

Purpose4/5

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

States a specific verb (drags) and the two endpoint forms (element or point), plus the mechanism ('real mouse events') and the drag-and-drop flavors supported. An agent can distinguish this from click/hover without opening the schema, though siblings are never named explicitly.

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

Usage Guidelines2/5

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

No guidance on when to prefer drag over hover/click or on which task shapes require it. The fromRef/from-vs-to/toRef choice is only documented in the schema, not framed as a usage rule, so the description leaves all routing decisions to inference.

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