Skip to main content
Glama

drag_and_drop

Drag a source element onto a target in Chrome to test drag-and-drop or sortable UI. Emits HTML5 or pointer events and returns after dispatch; verify drop acceptance separately.

Instructions

Drag an element onto another. html5 = DragEvent+DataTransfer; pointer = pointer/mouse events (sortable libraries). It scrolls the source into view and returns once the events are sent, without knowing whether the app accepted the drop (check with assert or query_dom); a missing element is an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoWhich event family to emit, since libraries listen to different oneshtml5
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
frame_idNoTarget iframe id from get_frames; omitted = main frame
source_selectorYesElement to drag; ">>>" pierces shadow DOM
target_selectorYesDrop target; ">>>" pierces shadow DOM

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.10.0
    • addedInput schema / properties / frame_id / description
      Added value: +"Target iframe id from get_frames; omitted = main frame"
    • addedInput schema / properties / mode / description
      Added value: +"Which event family to emit, since libraries listen to different ones"
    • addedInput schema / properties / source_selector / description
      Added value: +"Element to drag; \">>>\" pierces shadow DOM"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
    • addedInput schema / properties / target_selector / description
      Added value: +"Drop target; \">>>\" pierces shadow DOM"
  2. First observedv1.8.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that it scrolls the source into view, that it returns as soon as events are sent without knowing if the app accepted the drop, that a missing element raises an error, and what each event family emits. This optimistic/fire-and-forget behavior is exactly the kind of trait an agent needs and annotations do not convey.

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?

Front-loads the core action and packs mode semantics, side effects, and error behavior into three dense sentences with little waste. The semicolon-heavy style is slightly run-on but every clause carries information.

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

Completeness5/5

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

For a tricky interaction with no output schema, the description covers what an agent needs: purpose, mode choice, side effect (scrolling), optimistic return semantics, verification guidance, and the missing-element error. Nothing essential is missing.

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 coverage is 100% so the baseline is 3, but the description adds real meaning for mode ('html5 = DragEvent+DataTransfer; pointer = pointer/mouse events') beyond the schema enum text. It does not elaborate on tab_id/frame_id semantics, which the schema already covers.

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 and resource ('Drag an element onto another') plus the two event modes, so an agent immediately knows the operation. It stops short of explicitly contrasting itself with sibling interaction tools like click or hover, so it is clear but not fully sibling-differentiated.

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?

Gives clear context for mode selection ('libraries listen to different ones', pointer for sortable libraries) and names follow-up verification paths (assert, query_dom). It does not state explicit exclusions or when this tool is preferred over sibling interactions, so no full when/when-not framing.

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