Skip to main content
Glama

Drag

drag

Performs a boundary-clamped press-and-move gesture from start to end coordinates, enabling AI agents to move UI items or select ranges in Wayland desktop applications.

Instructions

Performs a clamped drag-and-drop gesture from start to end coordinates.

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": {
      "start_x": "<start_x>",
      "start_y": "<start_y>",
      "end_x": "<end_x>",
      "end_y": "<end_y>"
    },
    "name": "drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNo
end_xYes
end_yYes
start_xYes
start_yYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare this is a non-readonly, non-destructive, non-idempotent, non-open-world action, so the safety profile is covered. The description adds the notion of clamping, which is genuinely useful behavioral context, but never says what is clamped (screen bounds? window bounds?) or what happens at the boundary. No mention of which app/window receives the gesture.

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 no filler or redundant restatement of the title. It is efficient, though the brevity comes at the cost of the missing detail noted elsewhere rather than through deliberate prioritization.

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 five-parameter input-gesture tool with no output schema, an agent still lacks the coordinate frame, the role of pid, and the failure/clamping behavior. The annotations cover the safety profile but not the operational details needed to invoke this 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% across five parameters, so the description must carry the load. It only implicitly names start and end coordinates (four of five parameters) and says nothing about the pid parameter, the coordinate origin/units, or whether coordinates are screen-absolute or window-relative. It does not compensate for the coverage gap.

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 names a specific verb+resource ("drag-and-drop gesture") and the endpoints of the motion, which distinguishes it from click, hover, and double_click siblings. The term "clamped" is left unexplained, so the purpose is clear but one qualifier is opaque.

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 guidance on when to prefer this over click, double_click, hover, or interact_with_node, and no mention of prerequisites such as the target window needing focus or a prior hover/press. Usage must be inferred entirely from the name.

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