Skip to main content
Glama

Drag

drag
Destructive

Drag from one element or screen coordinate to another to move items, adjust sliders, or select ranges. Use element IDs or coordinates for each end, then verify the result with get_app_state.

Instructions

Press at one point, move, and release at another to drag and drop, move a slider, or select a range. Give each end as an element id or as screen coordinates; the two ends may use different forms. A drop can move or reorder items in the app, so verify the result with get_app_state. On macOS a drag must stay inside one app window and never moves the user's pointer; on Windows and Linux most drags use real mouse input, which moves the user's pointer (the result then says via cursor).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_xNoScreen x to release at, used with to_y when no to_element_id is given
to_yNoScreen y to release at, used with to_x when no to_element_id is given
from_xNoScreen x to start at, used with from_y when no from_element_id is given
from_yNoScreen y to start at, used with from_x when no from_element_id is given
to_element_idNoElement to release on, from get_app_state
from_element_idNoElement to start the drag on, from get_app_state

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.3.1
    • addedInput schema / properties / from_element_id / description
      Added value: +"Element to start the drag on, from get_app_state"
    • addedInput schema / properties / from_x / description
      Added value: +"Screen x to start at, used with from_y when no from_element_id is given"
    • addedInput schema / properties / from_y / description
      Added value: +"Screen y to start at, used with from_x when no from_element_id is given"
    • addedInput schema / properties / to_element_id / description
      Added value: +"Element to release on, from get_app_state"
    • addedInput schema / properties / to_x / description
      Added value: +"Screen x to release at, used with to_y when no to_element_id is given"
    • addedInput schema / properties / to_y / description
      Added value: +"Screen y to release at, used with to_x when no to_element_id is given"
  2. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

This is a standout description for behavioral transparency. It discloses side effects of dropping, warns that items may be moved or reordered, and explains platform-specific behavior: synthetic input on macOS that does not move the pointer versus real mouse input on Windows and Linux that does. This goes well beyond the annotations.

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?

Four sentences, each earning its place: gesture and purpose, endpoint specification, post-drop verification, and platform caveats. There is no filler, repetition, or vague wording.

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

Completeness5/5

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

For a six-parameter destructive tool with no output schema, the description covers all necessary invocation details: how to specify endpoints, what can happen as a result, and how to verify the outcome. The platform constraints are also spelled out, so an agent can select and invoke the tool correctly.

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 the individual parameters are already well documented. The description adds value by synthesizing the endpoint logic: each drag endpoint is either an element id or coordinates, and the two endpoints can use different forms. This combinatorial insight is not explicit in 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 defines the gesture precisely as 'press at one point, move, and release at another' and names concrete use cases: drag and drop, moving a slider, or selecting a range. This clearly distinguishes it from sibling tools like click, right_click, and scroll.

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?

The description gives clear usage context: endpoints can be element ids or screen coordinates, the two endpoints may mix forms, and post-drop results should be verified with get_app_state. It does not explicitly name alternative tools or say when not to use drag, but the guidance is otherwise strong.

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