Skip to main content
Glama

drag

Simulates a mouse press-and-move gesture between two coordinates to automate selections and window interactions while guarding against interrupting active user input.

Instructions

Drag mouse from (x1, y1) to (x2, y2) with User-Activity Guard and cursor/focus restore.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1Yes
x2Yes
y1Yes
y2Yes
hwndNo
buttonNoleft
durationNo
user_idle_msNo
client_coordsNo
restore_focusNo
restore_cursorNo
title_containsNo
respect_user_inputNo
wait_for_idle_secondsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It names 'User-Activity Guard' and 'cursor/focus restore' but does not explain what the guard does, how user activity is respected, what happens if the user is active, or what side effects a drag may have. This leaves significant behavioral gaps for a mutation-style input tool.

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?

The description is a single front-loaded sentence with no wasted words, efficiently stating the action and two notable behavioral traits. It is appropriately concise, though its brevity contributes to the under-specification noted elsewhere.

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 a complex tool with 14 parameters, no annotations, and 0% schema description coverage, the description is incomplete. It does not explain most parameters, provides no usage guidance, and only gestures at the user-activity guard behavior, leaving the agent without enough context to invoke the tool correctly.

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 must compensate for 14 parameters. It only clarifies the coordinate pairs and the restore flags implicitly, leaving hwnd, button, duration, user_idle_ms, client_coords, title_contains, respect_user_input, and wait_for_idle_seconds entirely undocumented in both schema and description.

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 states a specific verb ('Drag mouse') and resource/action ('from (x1, y1) to (x2, y2)'), making the core operation clear. It does not differentiate this tool from siblings like click or scroll, but the action itself is unambiguous.

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?

There is no explicit guidance on when to use this tool versus alternatives such as click, click_element, or scroll. The mention of 'User-Activity Guard and cursor/focus restore' hints at context but does not tell the agent when to choose drag or what preconditions apply.

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