Skip to main content
Glama

Drag

drag

Move an element with a real pointer to reorder sortable lists, drop onto elements or coordinates, or set slider values in native and pointer-driven interfaces.

Instructions

Drags an element with a real pointer: presses, carries (scrolling under itself where needed) and lets go. Drop onto another element (to, with slot before/after/on for sortable lists), onto a point of the view (x, y), or set a slider (value). Works for native drag and drop and for pointer-driven libraries.

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": {
      "from": "<from>"
    },
    "name": "drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
toNoAn element id from a listing, such as a12.
fromYesAn element id from a listing, such as a12.
slotNo
valueNoA range input's value to set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It does disclose meaningful mechanics — real pointer press/carry/release, auto-scrolling under itself, and compatibility with native DnD versus pointer-driven libraries — but says nothing about waiting for drop effects, timeouts, failure behavior, or permissions.

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?

Two sentences, front-loaded with the core mechanism followed by the mode enumeration; every clause adds information and there is no filler or repetition.

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 6-parameter, no-annotation, no-output-schema tool, the definition covers the mechanism, the three targeting modes and library compatibility. It is slightly thin on what happens after release (waits, verification, errors) and on how mutually exclusive parameters interact.

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 only 50%, and the description compensates well: it explains that 'to' is a drop target with 'slot' before/after/on for sortable lists, that x/y are a point of the view, and that 'value' sets a slider. It leaves 'from' to the schema's own description and gives no constraints on combining modes (e.g., to vs x/y precedence).

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?

States a specific verb and resource ('Drags an element') plus the mechanism ('with a real pointer: presses, carries... and lets go'), which separates it cleanly from siblings like click, hover and scroll. The three targeting modes are enumerated up front, so an agent knows exactly what the tool can do.

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 selection guidance among its own modes: drop onto an element (to + slot), onto a view coordinate (x, y), or set a slider (value), and notes it handles both native drag-and-drop and pointer-driven libraries. It does not explicitly state when to prefer a different tool (e.g., click/scroll) or any preconditions, so it falls short of a 5.

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