Skip to main content
Glama

browser_drag_and_drop

Drag a web element and drop it onto another target element using locator strategies, enabling automated drag-and-drop interactions in browser tests.

Instructions

Perform drag and drop between two elements

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": {
      "by": "<by>",
      "value": "<value>",
      "targetBy": "<targetBy>",
      "targetValue": "<targetValue>"
    },
    "name": "browser_drag_and_drop"
  }
}

Input Schema

NameRequiredDescriptionDefault
byYesLocator strategy to find element
valueYesValue for the locator strategy
timeoutNoMaximum time to wait for element in milliseconds
targetByYesLocator strategy to find target element
targetValueYesValue for the target locator strategy

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Changed1 schema field changed
    • changedInput schema / properties / targetBy / enum
      Previous value: -[
      -  "id",
      -  "css",
      -  "xpath",
      -  "name",
      -  "tag",
      -  "class"
      -]New value: +[
      +  "id",
      +  "css",
      +  "xpath",
      +  "name",
      +  "tag",
      +  "class",
      +  "link",
      +  "partialLink"
      +]
  5. First observed

TDQS

C2.9/5.0
Behavior2/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 and discloses almost nothing: it does not say whether the action scrolls elements into view, whether it auto-waits for interactability, whether the timeout applies to source, target, or both, or what happens if the drop target rejects the drag. For a multi-step browser interaction with no annotation coverage, this is a substantial gap.

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 front-loaded sentence with zero padding, which is appropriately sized for the amount of content present. The terseness is a symptom of under-specification rather than wasteful wording, so it does not fall below a 4 here.

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?

With five parameters, four of them required, no annotations, and no output schema, the description should explain preconditions, waiting behavior, and failure modes. A one-line statement leaves an agent unable to predict how the action behaves on a real page.

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 description coverage is 100% and all five parameters carry their own descriptions and enums, so the schema does the heavy lifting. The description adds only an implicit mapping of by/value to the source and targetBy/targetValue to the destination, which is a marginal contribution beyond the schema.

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 states a specific verb and resource ('perform drag and drop between two elements'), which is unambiguous and clearly distinct in meaning from click, hover, and double_click siblings. It stops short of explicitly contrasting itself with those siblings, so it lands at clear-but-undifferentiated rather than a 5.

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?

There is no guidance on when to use this versus hovering, clicking, or composing an execute_script call, and no stated preconditions such as both elements needing to be present, visible, or interactable. The agent must infer every usage condition from the tool name alone.

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