Skip to main content
Glama
computer
by zznabil

Drag

drag
Destructive

Move the pointer along a path of screenshot pixels, optionally holding keys or modifiers, to perform mouse gestures in desktop apps. Use real input takeover for apps that ignore background input.

Instructions

Drag along a path of screenshot pixels, optionally holding keys/modifiers. A background drag reaches apps that read posted mouse messages; apps that read the real pointer (Excel's fill handle, many canvases) ignore it, so check the result and rerun once with takeover: true when nothing changed.

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

Input Schema

NameRequiredDescriptionDefault
keysNoKeys held for the whole drag, e.g. ["space"].
pathYesPoints from start to end.
frameNo"screenshot" (default): x,y are pixels of the latest full screenshot of this target. "window": x,y are logical pixels from the window's top-left corner (list_windows width/height; an ax_find bound minus the window x,y). It keeps the target's capture sizing and changes baseline. If a frame is needed, the server uses the last requested bounds or the defaults.
buttonNo"left" (default), "right" or "middle".
targetYesWindow id from list_windows (a "window:<id>" prefix is accepted), "desktop", or "display:<id>" / "display:active" / "display:all". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard.
takeoverNoOmit to follow the plugin setting ("prefer" uses real input first, "fallback" tries background input first, "refuse" disables takeover). Use true for reliable input in Chromium (including Brave), Electron, and terminal hosts when takeover is allowed. Takeover brings the window forward and can interrupt the user. For window targets, use false to request background-only input; desktop and display targets send real input.
modifiersNoModifier keys held during the click, e.g. ["shift"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.11.0
    • changedInput schema / properties / frame / description
      Previous value: -"\"screenshot\" (default): x,y are pixels of the latest full screenshot of this target. \"window\": x,y are logical pixels from the window's top-left corner (list_windows width/height; an ax_find bound minus the window x,y); needs no screenshot. It takes a silent screenshot at the default size, which becomes this target's input frame."New value: +"\"screenshot\" (default): x,y are pixels of the latest full screenshot of this target. \"window\": x,y are logical pixels from the window's top-left corner (list_windows width/height; an ax_find bound minus the window x,y). It keeps the target's capture sizing and changes baseline. If a frame is needed, the server uses the last requested bounds or the defaults."
    • changedInput schema / properties / takeover / description
      Previous value: -"Omit (default): background first; the server decides any takeover. true: activate the window and post real input now. false: background only, never take over."New value: +"Omit to follow the plugin setting (\"prefer\" uses real input first, \"fallback\" tries background input first, \"refuse\" disables takeover). Use true for reliable input in Chromium (including Brave), Electron, and terminal hosts when takeover is allowed. Takeover brings the window forward and can interrupt the user. For window targets, use false to request background-only input; desktop and display targets send real input."
    • changedInput schema / properties / target / description
      Previous value: -"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."New value: +"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard."
  2. Changed2 schema fields changedv0.3.3
    • addedInput schema / properties / frame
      Added value: +{
      +  "description": "\"screenshot\" (default): x,y are pixels of the latest full screenshot of this target. \"window\": x,y are logical pixels from the window's top-left corner (list_windows width/height; an ax_find bound minus the window x,y); needs no screenshot. It takes a silent screenshot at the default size, which becomes this target's input frame.",
      +  "type": "string"
      +}
    • changedInput schema / properties / target / description
      Previous value: -"Window id from list_windows, \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."New value: +"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."
  3. First observedv0.2.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true and idempotentHint=false, so the risk profile is partly covered. The description adds genuinely useful context beyond that — background drags are silently ignored by apps reading the real pointer (Excel fill handle, canvases), and takeover brings the window forward and can interrupt the user — but it does not say what side effects a half-completed drag could leave behind.

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?

Two sentences, front-loaded with the core action, with the failure mode and remedy packed into the second. Dense but every clause carries decision-relevant information; only minor cost is that the parenthetical app examples lengthen the remedy sentence.

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 destructive, non-idempotent input-driving tool with no output schema, the description covers the essential trap (background vs real pointer) and tells the agent how to detect and recover from a no-op. It does not discuss verifying the drag result beyond 'check the result', which is left vague given no return schema exists.

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 100%, so baseline is 3, but the description goes slightly further by tying 'takeover: true' to a concrete retry scenario and tying 'keys/modifiers' to the hold-for-whole-drag semantics. It still leaves frame/button and the exact path point ordering entirely to the schema.

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?

The description states a specific verb and resource ('drag along a path of screenshot pixels') and pins down the optional modifier behavior in the same clause. It reads as distinct from move_mouse/click family calls because it describes a continuous multi-point gesture rather than a single positioning or press event.

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?

It gives concrete when-to guidance: if nothing changed because the app reads the real pointer, 'rerun once with takeover: true'. It does not explicitly compare against sibling tools (move_mouse/hold_mouse/click) for building a drag by hand, so it falls short of full alternative routing.

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