Skip to main content
Glama

drag

Simulates a real mouse press, move, and release between a source and target element or CSS selector, enabling drop interactions in the shared browser.

Instructions

Drag from one point/element to another (refs or CSS selectors) using real mouse events.

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": "<from>",
      "to": "<to>"
    },
    "name": "drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget element ref from snapshot: "e12" (single-agent) or "a<actor>:e12" (multi-agent session, copy exactly as shown), or a CSS selector
fromYesSource element ref from snapshot: "e12" (single-agent) or "a<actor>:e12" (multi-agent session, copy exactly as shown), or a CSS selector
tabIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / from / description
      Previous value: -"Source element ref or CSS selector"New value: +"Source element ref from snapshot: \"e12\" (single-agent) or \"a<actor>:e12\" (multi-agent session, copy exactly as shown), or a CSS selector"
    • changedInput schema / properties / to / description
      Previous value: -"Target element ref or CSS selector"New value: +"Target element ref from snapshot: \"e12\" (single-agent) or \"a<actor>:e12\" (multi-agent session, copy exactly as shown), or a CSS selector"
  2. First observedv0.2.1

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. 'Using real mouse events' is a genuine disclosure, since it tells the agent the drag is synthesized as input events rather than DOM manipulation. It says nothing about whether the drag waits for completion, how many intermediate steps it uses, whether elements must be visible or scrolled into view, or what side effects a drag (drops, uploads, alternate page state) may cause.

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?

A single front-loaded sentence that states the action, the endpoints, the accepted locator forms, and the event mechanism with no filler. Nothing in it is redundant.

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

Completeness3/5

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

For a simple two-locator gesture tool with no output schema, the description covers the essential mechanics but leaves out the mutation profile, which matters much more when annotations are absent. A drag can trigger destructive side effects such as drops or drag-upload zones, and the agent gets no signal about that. It is adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, so two of three parameters are documented in the schema with ref formats and CSS selector alternatives. The description repeats that same ref-or-selector notion without adding syntax, ordering, or constraints, and the third parameter, 'tabId', is undocumented in both places. With the schema doing most of the work, this sits at the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: 'Drag from one point/element to another (refs or CSS selectors)'. That is enough to separate it from 'click' or 'hover' by implication, since drag has a source and a destination. It does not name a sibling explicitly, so it stops just short of full differentiation.

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

Usage Guidelines2/5

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

The description says what the tool does but gives no guidance on when to use it instead of 'click', 'hover', or 'scroll', and no prerequisites such as a prior 'snapshot' to obtain refs. It only mentions that refs or CSS selectors are accepted, which is an input-format note rather than usage guidance.

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