Skip to main content
Glama

desktop_drag

Perform drag-and-drop actions between UI elements or screen coordinates. Specify source and destination refs or x,y points, with optional duration and drop-delay controls.

Instructions

agent-desktop drag: Drag from one element or point to another (requires --headed)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "desktop_drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoDestination element ref; requires --headed
fromNoSource element ref; requires --headed
to_xyNoDestination coordinates as x,y; requires --headed; write a negative value with = (--to-xy=-100,50)
from_xyNoSource coordinates as x,y; requires --headed; write a negative value with = (--from-xy=-100,50)
durationNoDrag duration in milliseconds
drop_delayNoHold over the destination this many ms before releasing, so the drop target activates; default 500 (150 on Linux)
timeout_msNoDrag action budget in milliseconds, including resolution, actionability, pickup, duration and drop delay; allow headroom for completion
wait_for_scopeNoWindow a drag's --wait-for/--wait-for-gone verification polls: 'to' (drop target, default) or 'from' (pickup). Needed when the confirmation appears only in the destination window of a cross-window drag

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it discloses almost nothing beyond the headed-mode requirement already repeated in every parameter description. It doesn't say what state the drag mutates, what happens on a failed drop, or how errors/timeouts surface.

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?

A single front-loaded sentence with the resource named first and the key constraint attached; the "agent-desktop drag:" prefix is mild redundancy but functions as namespacing. Nothing extraneous is present.

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

Completeness2/5

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

For an eight-parameter tool with zero annotations and no output schema, the description omits critical framing such as the source/destination pairing (element ref vs. coordinates) and the fact that no parameters are required. An agent could invoke it with no arguments and get an unexplained failure.

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 eight parameters including duration, drop_delay, timeout_ms, and wait_for_scope. The description adds no meaning beyond the schema, so the baseline of 3 applies.

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?

"Drag from one element or point to another" gives a specific verb (drag) and both endpoints, so an agent can separate it from desktop_click, desktop_double_click, and desktop_hover. It stops short of naming an alternative or stating how it differs from those pointer tools in practice.

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?

The only conditional guidance is "(requires --headed)", which is a prerequisite rather than a when-to-use rule. Nothing says when to prefer a drag over click/hover siblings, or when to use element refs versus coordinates.

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