Skip to main content
Glama

Drag Mouse

drag_mouse

Drags the mouse pointer from one screen coordinate to another while holding a specified button, enabling X11-only desktop automation and UI interactions.

Instructions

Drag with a button held from (x1,y1) to (x2,y2). X11 only.

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": {
      "x1": "<x1>",
      "y1": "<y1>",
      "x2": "<x2>",
      "y2": "<y2>"
    },
    "name": "drag_mouse"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1Yes
x2Yes
y1Yes
y2Yes
buttonNoleft

Output Schema

NameRequiredDescriptionDefault
resultYes

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?

With no annotations, the description must carry the behavioral load; it does disclose the key trait that a button is held for the duration and that the tool is X11-bound. It omits other meaningful behavior: drag speed/steps, whether a button release happens at the end, and what happens if the pointer isn't at the start point.

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 short clauses, zero filler, with the core gesture and the coordinates front-loaded before the environment caveat. Nothing could be removed without losing information.

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?

An output schema exists, so return values need no explanation, and the tool's scope is narrow. Still, for a five-parameter mutation tool with zero schema descriptions and no annotations, the definition leaves the button parameter's domain and the drag mechanics undocumented.

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

Parameters2/5

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

Schema description coverage is 0%, so the description needs to compensate and largely does not. It names the four coordinate parameters implicitly via (x1,y1)->(x2,y2) and hints at button by saying 'with a button held', but never states valid button values (left/right/middle) or that button defaults to left.

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?

The description gives a specific verb (drag) plus the resource/gesture and the exact coordinate pairs used, so an agent can distinguish it from move_mouse or click. It stops short of naming those siblings explicitly, which keeps it from a 5.

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

Usage Guidelines3/5

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

'X11 only' is a genuine use-condition that tells the agent when this tool is applicable and when it will fail. However, there is no guidance on when to prefer drag_mouse over move_mouse plus click, or on any prerequisites like the pointer needing to start at (x1,y1).

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

Deploy Server

Other Tools