Skip to main content
Glama

browser_drag

Drag elements between source and destination endpoints in an attached browser tab using refs, selectors, or coordinates, with automatic scrolling while held.

Instructions

Drag between endpoints, each exactly one ref/selector/x+y; destination auto-scrolls while held.

Input Schema

NameRequiredDescriptionDefault
modeNopointer for mouse-driven dragging; html5 for HTML drag-and-drop.pointer
stepsNo
sourceYes
observeNoRead this explicit control after the action within its remaining budget; observation is separate from delivery. No assertion or automatic replay.
settle_msNoAfter preparation, before dispatch: ms or uniform [min,max]; min<=max.
tab_handleYes
timeout_msNoTotal preparation/dispatch/verification and optional observation budget.
trajectoryNoOpt-in curved, variable-speed steps/intervals; curve_px is signed CSS-pixel offset. Duration covers interpolation waits only.
destinationYes
dialog_policyNoaccept/dismiss auto-handle dialogs and return their messages.ask

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.28.2
    • addedInput schema / properties / observe
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Read this explicit control after the action within its remaining budget; observation is separate from delivery. No assertion or automatic replay.",
      +  "properties": {
      +    "frame": {
      +      "additionalProperties": false,
      +      "description": "Child frame: at least one of url/title/path. url/title exact; path=unique nested CSS iframe steps (e.g. [\"#frame\"]); exclusive with frame_id.",
      +      "properties": {
      +        "path": {
      +          "items": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "maxItems": 16,
      +          "minItems": 1,
      +          "type": "array"
      +        },
      +        "title": {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "url": {
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "frame_id": {
      +      "description": "Selector frame; default main.",
      +      "type": "string"
      +    },
      +    "max_chars": {
      +      "default": 16000,
      +      "maximum": 64000,
      +      "minimum": 1000,
      +      "type": "integer"
      +    },
      +    "max_options": {
      +      "default": 30,
      +      "maximum": 100,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "name": {
      +      "description": "role only: exact AX name; empty allowed.",
      +      "maxLength": 10000,
      +      "type": "string"
      +    },
      +    "nth": {
      +      "description": "Selector only: zero-based DOM index, AX tree order for role.",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "popup_selector": {
      +      "description": "Optional unique CSS popup in the control frame; otherwise use browser-resolved controls/owns relations and control descendants.",
      +      "maxLength": 10000,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "ref": {
      +      "type": "string"
      +    },
      +    "selector": {
      +      "description": "Query by selector_type; role example: selector=\"link\", name=\"Claim\".",
      +      "maxLength": 10000,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "selector_type": {
      +      "description": "Default css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute.",
      +      "enum": [
      +        "css",
      +        "xpath",
      +        "label",
      +        "placeholder",
      +        "role"
      +      ],
      +      "type": "string"
      +    },
      +    "timeout_ms": {
      +      "default": 1000,
      +      "maximum": 5000,
      +      "minimum": 100,
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"Total preparation/dispatch/verification budget."New value: +"Total preparation/dispatch/verification and optional observation budget."
  2. Changed18 schema fields changedv0.24.2
    • changedInput schema / properties / destination / properties / frame / description
      Previous value: -"Exact child-frame URL/title or CSS iframe path (e.g. [\"#content_iframe\"]); alternative to frame_id. Each path entry uniquely selects an iframe in the preceding document."New value: +"Child frame: at least one of url/title/path. url/title exact; path=unique nested CSS iframe steps (e.g. [\"#frame\"]); exclusive with frame_id."
    • changedInput schema / properties / destination / properties / frame_id / description
      Previous value: -"Selector scope; defaults to main frame."New value: +"Selector frame; default main."
    • changedInput schema / properties / destination / properties / name / description
      Previous value: -"role only: exact accessible name; may be empty."New value: +"role only: exact AX name; empty allowed."
    • changedInput schema / properties / destination / properties / nth / description
      Previous value: -"Zero-based match index: DOM order, or AX tree order for role."New value: +"Selector only: zero-based DOM index, AX tree order for role."
    • changedInput schema / properties / destination / properties / offset / description
      Previous value: -"Native element only: ratios within its content quad; offscreen/covered points fail."New value: +"Native element only: ratios within its content quad; hit checks still apply."
    • changedInput schema / properties / destination / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."New value: +"Query by selector_type; role example: selector=\"link\", name=\"Claim\"."
    • changedInput schema / properties / destination / properties / selector_type / description
      Previous value: -"Default css. label matches associated HTML labels with whitespace normalized; role uses browser AX semantics."New value: +"Default css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute."
    • changedInput schema / properties / dialog_policy / description
      Previous value: -"accept/dismiss returns handled dialog messages."New value: +"accept/dismiss auto-handle dialogs and return their messages."
    • changedInput schema / properties / settle_ms / description
      Previous value: -"Pause after target preparation, before dispatch: fixed ms or uniform [min, max]."New value: +"After preparation, before dispatch: ms or uniform [min,max]; min<=max."
    • changedInput schema / properties / source / properties / frame / description
      Previous value: -"Exact child-frame URL/title or CSS iframe path (e.g. [\"#content_iframe\"]); alternative to frame_id. Each path entry uniquely selects an iframe in the preceding document."New value: +"Child frame: at least one of url/title/path. url/title exact; path=unique nested CSS iframe steps (e.g. [\"#frame\"]); exclusive with frame_id."
    • changedInput schema / properties / source / properties / frame_id / description
      Previous value: -"Selector scope; defaults to main frame."New value: +"Selector frame; default main."
    • changedInput schema / properties / source / properties / name / description
      Previous value: -"role only: exact accessible name; may be empty."New value: +"role only: exact AX name; empty allowed."
    • changedInput schema / properties / source / properties / nth / description
      Previous value: -"Zero-based match index: DOM order, or AX tree order for role."New value: +"Selector only: zero-based DOM index, AX tree order for role."
    • changedInput schema / properties / source / properties / offset / description
      Previous value: -"Native element only: ratios within its content quad; offscreen/covered points fail."New value: +"Native element only: ratios within its content quad; hit checks still apply."
    • changedInput schema / properties / source / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."New value: +"Query by selector_type; role example: selector=\"link\", name=\"Claim\"."
    • changedInput schema / properties / source / properties / selector_type / description
      Previous value: -"Default css. label matches associated HTML labels with whitespace normalized; role uses browser AX semantics."New value: +"Default css. label: exact associated HTML label, whitespace normalized. placeholder: exact attribute."
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"Covers preparation, dispatch and verification."New value: +"Total preparation/dispatch/verification budget."
    • changedInput schema / properties / trajectory / description
      Previous value: -"Opt in to curved, variable-speed steps and varied intervals. Signed curve control-point offset in CSS px; duration covers interpolation waits only."New value: +"Opt-in curved, variable-speed steps/intervals; curve_px is signed CSS-pixel offset. Duration covers interpolation waits only."
  3. Changed2 schema fields changedv0.24.1
    • changedInput schema / properties / destination / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role, according to selector_type."New value: +"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."
    • changedInput schema / properties / source / properties / selector / description
      Previous value: -"CSS/XPath query, HTML label text, exact placeholder or AX role, according to selector_type."New value: +"CSS/XPath query, HTML label text, exact placeholder or AX role (e.g. selector=\"link\", name=\"Claim\"), according to selector_type."
  4. First observedv0.24.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add one genuinely useful trait: the destination auto-scrolls while the drag is held. It says nothing about drop verification, hit-check failures, dialog handling during the drag, or what a failed drag returns, which matters for a stateful pointer operation.

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?

A single dense sentence with no filler, and the core operation is front-loaded. It is terse to the point of under-specification, but that cost is accounted for elsewhere rather than being padding.

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

Completeness2/5

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

For a 10-parameter, nested-object tool with no annotations and no output schema, one sentence is not enough. An agent gets no guidance on mode selection, the timeout/preparation budget, the optional post-action observation, or dialog behavior during the drag.

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?

The phrase 'each exactly one ref/selector/x+y' encodes a mutual-exclusivity rule the schema does not express (the nested objects have no oneOf constraint), which is real added value. But it leaves 'mode', 'steps', 'trajectory', 'settle_ms', 'observe', 'dialog_policy' and 'coordinate_space' to the schema, several of which have no description at all (60% coverage).

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?

States a specific verb and resource ('Drag between endpoints'), and the 'source'/'destination' framing makes the operation unambiguous. No sibling is named, but no other sibling tool performs a drag, so confusion risk is low.

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 never says when to choose a drag over browser_click/browser_hover, nor when to pick the 'pointer' mode versus 'html5' drag-and-drop (the schema documents what each mode means but not which situation calls for it). Only the endpoint-shape constraint is given as usage guidance.

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