Skip to main content
Glama
jumodada

DrissionPage MCP Server

by jumodada

Get Element State

element_state_get
Read-onlyIdempotent

Retrieve the current state and geometry of a web element using a selector or accessibility target. Verify visibility, position, and dimensions before interacting.

Instructions

Return DrissionPage element state and page/viewport geometry for a selector or accessibility target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoOptional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.
timeoutNo
selectorYesString locator or structured selector/accessibility target with frame and shadow scope.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 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"
      +}
    • addedOutput schema / $defs / ElementPresentationData
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "ancestor_3d": {
      +      "title": "Ancestor 3D",
      +      "type": "boolean"
      +    },
      +    "coordinate_actionability": {
      +      "enum": [
      +        "ready",
      +        "hidden",
      +        "off_viewport",
      +        "covered",
      +        "pointer_disabled",
      +        "transformed_3d",
      +        "target_document_only"
      +      ],
      +      "title": "Coordinate Actionability",
      +      "type": "string"
      +    },
      +    "display": {
      +      "title": "Display",
      +      "type": "string"
      +    },
      +    "opacity": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Opacity"
      +    },
      +    "perspective": {
      +      "title": "Perspective",
      +      "type": "string"
      +    },
      +    "pointer_events": {
      +      "title": "Pointer Events",
      +      "type": "string"
      +    },
      +    "three_dimensional": {
      +      "title": "Three Dimensional",
      +      "type": "boolean"
      +    },
      +    "transform": {
      +      "title": "Transform",
      +      "type": "string"
      +    },
      +    "transform_style": {
      +      "title": "Transform Style",
      +      "type": "string"
      +    },
      +    "transformed": {
      +      "title": "Transformed",
      +      "type": "boolean"
      +    },
      +    "visibility": {
      +      "title": "Visibility",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "display",
      +    "visibility",
      +    "opacity",
      +    "pointer_events",
      +    "transform",
      +    "transform_style",
      +    "perspective",
      +    "transformed",
      +    "ancestor_3d",
      +    "three_dimensional",
      +    "coordinate_actionability"
      +  ],
      +  "title": "ElementPresentationData",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / ElementRectData / properties / viewport_coordinate_space
      Added value: +{
      +  "enum": [
      +    "top_level_viewport",
      +    "target_document_viewport"
      +  ],
      +  "title": "Viewport Coordinate Space",
      +  "type": "string"
      +}
    • changedOutput schema / $defs / ElementRectData / required
      Previous value: -[
      -  "location",
      -  "size",
      -  "midpoint",
      -  "click_point",
      -  "viewport_location",
      -  "viewport_midpoint",
      -  "viewport_click_point",
      -  "coordinate_space"
      -]New value: +[
      +  "location",
      +  "size",
      +  "midpoint",
      +  "click_point",
      +  "viewport_location",
      +  "viewport_midpoint",
      +  "viewport_click_point",
      +  "coordinate_space",
      +  "viewport_coordinate_space"
      +]
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "alive": {
      -            "title": "Alive",
      -            "type": "boolean"
      -          },
      -          "checked": {
      -            "title": "Checked",
      -            "type": "boolean"
      -          },
      -          "clickable": {
      -            "title": "Clickable",
      -            "type": "boolean"
      -          },
      -          "covered": {
      -            "title": "Covered",
      -            "type": "boolean"
      -          },
      -          "covering_backend_node_id": {
      -            "anyOf": [
      -              {
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "title": "Covering Backend Node Id"
      -          },
      -          "displayed": {
      -            "title": "Displayed",
      -            "type": "boolean"
      -          },
      -          "enabled": {
      -            "title": "Enabled",
      -            "type": "boolean"
      -          },
      -          "exact": {
      -            "anyOf": [
      -              {
      -                "type": "boolean"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "title": "Exact"
      -          },
      -          "frame_selectors": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "title": "Frame Selectors",
      -            "type": "array"
      -          },
      -          "in_viewport": {
      -            "title": "In Viewport",
      -            "type": "boolean"
      -          },
      -          "locator": {
      -            "title": "Locator",
      -            "type": "string"
      -          },
      -          "name": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "title": "Name"
      -          },
      -          "rect": {
      -            "$ref": "#/$defs/ElementRectData"
      -          },
      -          "role": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "title": "Role"
      -          },
      -          "selected": {
      -            "title": "Selected",
      -            "type": "boolean"
      -          },
      -          "selector": {
      -            "title": "Selector",
      -            "type": "string"
      -          },
      -          "selector_normalized": {
      -            "title": "Selector Normalized",
      -            "type": "boolean"
      -          },
      -          "selector_strategy": {
      -            "title": "Selector Strategy",
      -            "type": "string"
      -          },
      -          "shadow_hosts": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "title": "Shadow Hosts",
      -            "type": "array"
      -          },
      -          "tag": {
      -            "title": "Tag",
      -            "type": "string"
      -          },
      -          "target_kind": {
      -            "default": "selector",
      -            "enum": [
      -              "selector",
      -              "accessibility"
      -            ],
      -            "title": "Target Kind",
      -            "type": "string"
      -          },
      -          "text": {
      -            "title": "Text",
      -            "type": "string"
      -          },
      -          "whole_in_viewport": {
      -            "title": "Whole In Viewport",
      -            "type": "boolean"
      -          }
      -        },
      -        "required": [
      -          "selector",
      -          "locator",
      -          "selector_strategy",
      -          "selector_normalized",
      -          "tag",
      -          "text",
      -          "displayed",
      -          "enabled",
      -          "alive",
      -          "clickable",
      -          "checked",
      -          "selected",
      -          "in_viewport",
      -          "whole_in_viewport",
      -          "covered",
      -          "covering_backend_node_id",
      -          "rect"
      -        ],
      -        "title": "ElementStateData",
      -        "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": {
      +          "alive": {
      +            "title": "Alive",
      +            "type": "boolean"
      +          },
      +          "checked": {
      +            "title": "Checked",
      +            "type": "boolean"
      +          },
      +          "clickable": {
      +            "title": "Clickable",
      +            "type": "boolean"
      +          },
      +          "covered": {
      +            "title": "Covered",
      +            "type": "boolean"
      +          },
      +          "covering_backend_node_id": {
      +            "anyOf": [
      +              {
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "title": "Covering Backend Node Id"
      +          },
      +          "displayed": {
      +            "title": "Displayed",
      +            "type": "boolean"
      +          },
      +          "enabled": {
      +            "title": "Enabled",
      +            "type": "boolean"
      +          },
      +          "exact": {
      +            "anyOf": [
      +              {
      +                "type": "boolean"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "title": "Exact"
      +          },
      +          "frame_selectors": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "title": "Frame Selectors",
      +            "type": "array"
      +          },
      +          "in_viewport": {
      +            "title": "In Viewport",
      +            "type": "boolean"
      +          },
      +          "locator": {
      +            "title": "Locator",
      +            "type": "string"
      +          },
      +          "name": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "title": "Name"
      +          },
      +          "presentation": {
      +            "$ref": "#/$defs/ElementPresentationData"
      +          },
      +          "rect": {
      +            "$ref": "#/$defs/ElementRectData"
      +          },
      +          "role": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "title": "Role"
      +          },
      +          "selected": {
      +            "title": "Selected",
      +            "type": "boolean"
      +          },
      +          "selector": {
      +            "title": "Selector",
      +            "type": "string"
      +          },
      +          "selector_normalized": {
      +            "title": "Selector Normalized",
      +            "type": "boolean"
      +          },
      +          "selector_strategy": {
      +            "title": "Selector Strategy",
      +            "type": "string"
      +          },
      +          "shadow_hosts": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "title": "Shadow Hosts",
      +            "type": "array"
      +          },
      +          "tab_id": {
      +            "description": "MCP tab id captured for this operation.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "tag": {
      +            "title": "Tag",
      +            "type": "string"
      +          },
      +          "target_kind": {
      +            "default": "selector",
      +            "enum": [
      +              "selector",
      +              "accessibility"
      +            ],
      +            "title": "Target Kind",
      +            "type": "string"
      +          },
      +          "text": {
      +            "title": "Text",
      +            "type": "string"
      +          },
      +          "whole_in_viewport": {
      +            "title": "Whole In Viewport",
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "selector",
      +          "locator",
      +          "selector_strategy",
      +          "selector_normalized",
      +          "tag",
      +          "text",
      +          "displayed",
      +          "enabled",
      +          "alive",
      +          "clickable",
      +          "checked",
      +          "selected",
      +          "in_viewport",
      +          "whole_in_viewport",
      +          "covered",
      +          "covering_backend_node_id",
      +          "rect",
      +          "presentation",
      +          "tab_id"
      +        ],
      +        "title": "ElementStateData",
      +        "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. Addedv0.8.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare this as a safe (readOnly, idempotent, non-destructive) but open-world read, so the safety profile is covered. The description adds that geometry for both page and viewport is returned, but says nothing about timeout behavior, what happens when the element is missing, or whether the call waits.

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 the resource and verb first, no filler. It is efficient, though the brevity contributes to the ambiguity noted elsewhere.

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 not be spelled out. However, for a 3-parameter inspection tool sitting among ~30 element/page siblings, the description leaves the concept of 'state' and the tab/timeout semantics for the agent to piece together from structured data alone.

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 67%, so most meaning is carried by the schema itself (tab_id and the selector union are documented there). The description only echoes the selector/accessibility distinction already encoded in the discriminated union and says nothing about tab_id or timeout.

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 (Return) and resource (element state and page/viewport geometry) and names the accepted target forms (selector or accessibility target). It distinguishes itself adequately from element_get_text/attribute/property/html siblings, though 'element state' remains somewhat abstract about which state properties are returned.

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 when-to-use guidance, no mention of alternatives among the many element_* siblings, and no stated preconditions (e.g., element must exist, tab must be active). The agent must infer context entirely from the name and schema.

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