Skip to main content
Glama

Drag

drag
Destructive

Press at one point and release at another to move or reorder items, adjust sliders, or select ranges, using element IDs or screen coordinates.

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
state_queryNoWith return_state, list only elements whose role, label or value contains this text, like get_app_state's query
return_stateNoAfter acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.
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. Changed2 schema fields changedv0.5.2
    • addedInput schema / properties / return_state
      Added value: +{
      +  "description": "After acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / state_query
      Added value: +{
      +  "description": "With return_state, list only elements whose role, label or value contains this text, like get_app_state's query",
      +  "type": "string"
      +}
  2. 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"
  3. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint/readOnlyHint) by disclosing consequences ('a drop can move or reorder items'), platform-specific input mechanics (macOS stays inside one window and never moves the pointer; Windows/Linux use real mouse input and report 'via cursor'), and that ids are invalidated by return_state. This is exactly the behavioral context annotations cannot express.

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?

Three sentences, front-loaded with the physical action and use cases, then the parameter-form rule, then verification and platform behavior. No filler sentences; each one changes how an agent would call the tool.

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 an 8-param, no-output-schema mutation tool, the description covers the interaction model, verification path (get_app_state / return_state), and platform caveats. Only the non-return_state response shape is left implicit, a minor gap given return_state is documented.

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 per-parameter docs carry the load and the baseline is 3. The description still adds non-obvious semantics: the two ends may use different forms (mixing element id and coordinates), exceeds what the schema descriptions alone convey.

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?

States a concrete verb and physical action ('press at one point, move, release at another') and enumerates the three distinct outcomes: drag-and-drop, slider movement, range selection. This is enough for an agent to separate 'drag' from click, hover, select_text, and press_key without opening any schema.

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?

Gives clear operating conditions: each end may be an element id or coordinates and the two forms can be mixed, and the result should be verified with get_app_state. It also flags the platform constraint on macOS versus Windows/Linux. It stops short of explicit when-not-to-use guidance against siblings like click or select_text.

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