Skip to main content
Glama

Drag from one point to another on a canvas

qa_drag_point

Drag from one point to another with stepped pointer moves to move shapes, marquee selections, pan canvases, or draw boxes on canvas UIs that track pointer paths while the button is held.

Instructions

Press at one point, move, release at another — the other half of canvas work, and the half a click cannot express: moving a shape, marqueeing a selection, panning, drawing a box, dragging a handle. Without it an agent fakes a drag out of two clicks and changes something nobody asked for. The pointer is moved in STEPS between the two points (12 by default), because a single jump from start to end is not a drag to most canvas code — it tracks the pointer while the button is down, and one giant delta reads as a glitch or as nothing at all. The moves go to the element the drag STARTED on, which is what a browser does once a button is down. Same coordinates and the same honest limit as qa_click_point: CSS pixels from the top-left of the viewport, and isTrusted: false. Requires the one-time “Agent control” confirmation in the panel; without it the extension answers consent-required and does nothing.

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": {
      "x": "<x>",
      "y": "<y>",
      "toX": "<toX>",
      "toY": "<toY>"
    },
    "name": "qa_drag_point"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesStart — CSS pixels from the LEFT of the viewport
yYesStart — CSS pixels from the TOP of the viewport
toXYesEnd — CSS pixels from the LEFT of the viewport
toYYesEnd — CSS pixels from the TOP of the viewport
stepsNoHow many pointermove events to send between the two points (2–60, default 12). More for a canvas that samples the path, fewer for a simple handle.
tabIdNoTarget tab (from qa_tabs); omit for the active tab

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.86.2

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: pointer moves in STEPS (12 default) with the reason, events dispatch to the element where the drag started, coordinates are CSS pixels from the viewport top-left, and events are `isTrusted: false`. It also discloses the prerequisite one-time 'Agent control' confirmation and that the tool returns consent-required and does nothing without it — a failure mode most definitions omit.

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?

Front-loaded with the action and its purpose, then mechanism, then constraints. Dense but nearly every sentence carries information; the rhetorical framing ('the half a click cannot express', 'changes something nobody asked for') costs a few words without derailing the read.

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 6-parameter mutation-style pointer tool with no annotations and no output schema, everything an agent needs is present: coordinate system, step count semantics, event targeting, trust flag, and the consent gate that determines success or failure. Nothing material is left to inference.

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; the description nevertheless adds real meaning by explaining why `steps` exists — a single jump reads as a glitch or nothing to canvas code that samples the path — and by confirming the coordinate frame shared with qa_click_point. `tabId` is left entirely to the schema, which keeps this below 5.

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+resource: press at one point, move, release at another, on a canvas. It explicitly positions itself against qa_click_point as 'the other half of canvas work' and enumerates the outcomes it produces (moving a shape, marqueeing, panning, drawing a box, dragging a handle). An agent can distinguish it from the click siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives positive use cases and an explicit anti-pattern: 'Without it an agent fakes a drag out of two clicks and changes something nobody asked for.' That names the wrong approach and the consequence, which is exactly the routing guidance an agent needs versus qa_click_point.

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