Skip to main content
Glama
jumodada

DrissionPage MCP Server

by jumodada

Drag Element to Structured Destination

page_pointer_drag_element
Destructive

Drag from a resolved source element to an element, offset, or track-ratio target using CSS/XPath, iframe, or Shadow DOM selectors, with a failure-safe pointer action.

Instructions

Resolve a source element and element, offset, or track-ratio destination immediately before one failure-safe drag. Supports CSS/XPath in the top document or one same-origin iframe, plus CSS paths through nested open Shadow DOM hosts; use coordinate drag for visual-only targets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buttonNoleft
sourceYes
tab_idNoOptional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.
profileNodirect
destinationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.8
    • addedInput schema / properties / tab_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.",
      +  "title": "Tab Id"
      +}
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "destination": {
      -            "$ref": "#/$defs/PointerDragElementDestinationData"
      -          },
      -          "motion": {
      -            "$ref": "#/$defs/PointerDragData"
      -          },
      -          "source": {
      -            "$ref": "#/$defs/ResolvedPointerTargetData"
      -          },
      -          "url": {
      -            "title": "Url",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "source",
      -          "destination",
      -          "url",
      -          "motion"
      -        ],
      -        "title": "PagePointerDragElementData",
      -        "type": "object"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "ok": {
      -        "const": true
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "message",
      -      "data"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "details": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "message": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "ok": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "message",
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "destination": {
      +            "$ref": "#/$defs/PointerDragElementDestinationData"
      +          },
      +          "motion": {
      +            "$ref": "#/$defs/PointerDragData"
      +          },
      +          "source": {
      +            "$ref": "#/$defs/ResolvedPointerTargetData"
      +          },
      +          "tab_id": {
      +            "description": "MCP tab id captured for this operation.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "url": {
      +            "title": "Url",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "source",
      +          "destination",
      +          "url",
      +          "motion",
      +          "tab_id"
      +        ],
      +        "title": "PagePointerDragElementData",
      +        "type": "object"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": true
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "message",
      +      "data"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "details": {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "message",
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed9 schema fields changedv0.8.0
    • addedInput schema / $defs / ElementSourceInput
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "kind": {
      +      "const": "element",
      +      "title": "Kind",
      +      "type": "string"
      +    },
      +    "target": {
      +      "$ref": "#/$defs/ElementTargetInput"
      +    }
      +  },
      +  "required": [
      +    "kind",
      +    "target"
      +  ],
      +  "title": "ElementSourceInput",
      +  "type": "object"
      +}
    • addedInput schema / $defs / OffsetDestinationInput / properties / dx
      Added value: +{
      +  "description": "Horizontal delta from the freshly resolved source point.",
      +  "maximum": 10000,
      +  "minimum": -10000,
      +  "title": "Dx",
      +  "type": "number"
      +}
    • addedInput schema / $defs / OffsetDestinationInput / properties / dy
      Added value: +{
      +  "description": "Vertical delta from the freshly resolved source point.",
      +  "maximum": 10000,
      +  "minimum": -10000,
      +  "title": "Dy",
      +  "type": "number"
      +}
    • removedInput schema / $defs / OffsetDestinationInput / properties / x
      Removed value: -{
      -  "maximum": 10000,
      -  "minimum": -10000,
      -  "title": "X",
      -  "type": "number"
      -}
    • removedInput schema / $defs / OffsetDestinationInput / properties / y
      Removed value: -{
      -  "maximum": 10000,
      -  "minimum": -10000,
      -  "title": "Y",
      -  "type": "number"
      -}
    • changedInput schema / $defs / OffsetDestinationInput / required
      Previous value: -[
      -  "kind",
      -  "x",
      -  "y"
      -]New value: +[
      +  "kind",
      +  "dx",
      +  "dy"
      +]
    • removedInput schema / properties / source / $ref
      Removed value: -"#/$defs/ElementTargetInput"
    • addedInput schema / properties / source / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/ElementTargetInput"
      +  },
      +  {
      +    "$ref": "#/$defs/ElementSourceInput"
      +  }
      +]
    • addedInput schema / properties / source / title
      Added value: +"Source"
  3. Addedv0.7.2

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, so the safety profile is covered. The description adds real behavioral context beyond that: resolution happens 'immediately before' the drag, the action is 'failure-safe' (single atomic attempt), and selector scope is bounded to the top document, one same-origin iframe, and CSS paths through nested open shadow hosts.

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?

Two dense sentences, front-loaded with the core action before the capability scoping. Every clause carries information, though the second sentence is a semicolon-joined run-on covering three separate constraints.

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?

An output schema exists so return values need no explanation, and annotations cover the mutation safety profile. However, with 5 parameters at 20% schema coverage, the description leaves profile ('direct' vs 'natural'), button, and tab_id semantics entirely undocumented, and never warns that a drag may reorder or move content despite destructiveHint=true.

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 only 20%, so the description must compensate, and it partially does: it names the three destination kinds and the selector forms (CSS/XPath, iframe, shadow hosts) that map to the target object. It says nothing about the remaining parameters (button, profile, tab_id), leaving those to bare enum/field names.

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 specific verb and resource ('drag' of a resolved source element to a structured destination) and enumerates the three destination shapes (element, offset, track-ratio) that match the schema's discriminated union. It also differentiates itself from the coordinate-based sibling by pointing to 'coordinate drag for visual-only targets'.

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

Usage Guidelines4/5

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

Gives one explicit routing condition — use coordinate drag when the target is visual-only — which effectively selects page_pointer_drag over this tool. It does not state the inverse ('use this tool when the destination is a real DOM element') or any prerequisites, but the context is clear.

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