Skip to main content
Glama

mac_drag

Drag from one UI element to another (sliders, selections, list items) with the physical pointer; from_index/to_index come from mac_ax_state or mac_find (valid 30 s).

Instructions

Drag from one UI element to another (sliders, selections, list items) with the physical pointer; from_index/to_index come from mac_ax_state or mac_find (valid 30 s). Both ends are re-identified and hit-tested first (either one gone or covered: nothing sent). hold_ms (0-2000) presses and holds after mouse-down before the move starts (timeline editors use it to tell clip-move from marquee selection); step_ms (1-500) moves in steps of about 20 points with that many ms between them. A drag whose holds and steps add up to more than 10 s is refused; a drag that fails midway gets a mouse-up so the button is not left held. Check the drop target afterwards.

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": {
      "from_index": "<from_index>",
      "to_index": "<to_index>"
    },
    "name": "mac_drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
hold_msNo
step_msNo
to_indexYes
from_indexYes
snapshot_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • addedInput schema / properties / hold_ms
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / step_ms
      Added value: +{
      +  "type": "integer"
      +}
  2. Changed1 schema field changedv0.2.6
    • addedInput schema / properties / snapshot_id
      Added value: +{
      +  "type": "string"
      +}
  3. First observedv0.1.2

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: both endpoints are re-identified and hit-tested first, and nothing is sent if either is gone or covered. It also discloses the 10 s budget cap and the midway-failure mouse-up recovery so the button is never left held, which the readOnly/destructive hints do not convey.

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?

Dense but front-loaded: the action and index provenance come first, with timing semantics and failure handling after. A single run-on block using semicolons and parentheses — every clause carries information, though a light bulleted split would read faster.

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 5-param, no-output-schema input tool with zero annotation detail, it covers preconditions, timing knobs, limits, failure recovery, and a post-condition check. The only residual gap is snapshot_id, which is minor against the overall coverage.

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 0%, so the description carries the load, and it does for four params: hold_ms purpose and 0-2000 range, step_ms 1-500 with ~20-point stepping, and index provenance plus TTL. snapshot_id is never explained, leaving one parameter undocumented in both schema and prose.

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 specific verb and resource ('Drag from one UI element to another ... with the physical pointer') and gives concrete exemplar targets (sliders, selections, list items). It is immediately distinguishable from mac_click by the two-endpoint, physical-pointer framing.

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?

Explicitly tells the agent where from_index/to_index must come from (mac_ax_state or mac_find) and that they expire after 30 s, plus 'Check the drop target afterwards' as a verification step. It stops short of naming when to prefer mac_click or other input alternatives instead of a drag.

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