Skip to main content
Glama

拖拽

browser_drag
Destructive

Drag an element onto another element or by pixel offsets to move sliders, reorder drag-and-drop lists, and position canvas items.

Instructions

Drag an element by ref to another element (toRef) or by a relative pixel offset (dx, dy). Useful for sliders, drag-and-drop sortable lists, and canvas boards.

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": {
      "ref": "<ref>"
    },
    "name": "browser_drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
dxNoRelative horizontal offset in pixels (e.g. 150)
dyNoRelative vertical offset in pixels (e.g. -50)
refYesSource element ref to drag from
tabIdNoTab id (default: active tab)
toRefNoTarget element ref to drop onto
snapshotNoReturn an incremental snapshot after the action (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, and idempotentHint=false, so the risk profile is known. The description adds the two-mode behavior (drop onto a ref vs. move by offset), which is useful, but says nothing about intermediate move steps, auto-scroll, or what happens to the dragged element on failure.

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?

Two sentences, both load-bearing: the first gives the mechanics and the second gives applicability. Front-loaded with the action and free of filler.

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 6-parameter mutation tool with annotations and no output schema, the definition covers the core path but leaves the required/optional interplay unresolved: ref is required, yet a drag with no toRef and no dx/dy is undefined. A sentence on that edge case would close the remaining gap.

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 baseline is 3, and the description goes slightly beyond it by framing toRef and dx/dy as alternative ways to specify the drag destination — a relationship the schema does not state. It still does not say what occurs if neither is supplied or if both are.

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 names a specific verb and resource ('Drag an element by ref') and enumerates both operating modes (toRef target vs. dx/dy pixel offset). That distinguishes it cleanly from browser_click and browser_hover, though it never names a sibling explicitly.

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

Usage Guidelines3/5

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

Three concrete use cases (sliders, sortable lists, canvas boards) imply when to reach for it, which is better than nothing. There is no exclusion guidance, no note on when a click/hover is sufficient, and no stated prerequisite that refs must come from a prior snapshot.

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