Skip to main content
Glama
jumodada

DrissionPage MCP Server

by jumodada

Find Shadow Element

shadow_find
Read-onlyIdempotent

Find one element inside a shadow root exposed by DrissionPage by specifying the host selector and inner selector. Optionally set a tab ID and timeout.

Instructions

Find one element inside a shadow root exposed by the supported DrissionPage runtime.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoOptional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.
timeoutNo
selectorYesSelector inside the shadow root.
host_selectorYesSelector for the shadow host element.

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": {
      -          "element": {
      -            "additionalProperties": true,
      -            "title": "Element",
      -            "type": "object"
      -          },
      -          "host": {
      -            "additionalProperties": true,
      -            "title": "Host",
      -            "type": "object"
      -          }
      -        },
      -        "required": [
      -          "host",
      -          "element"
      -        ],
      -        "title": "ShadowFindData",
      -        "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": {
      +          "element": {
      +            "additionalProperties": true,
      +            "title": "Element",
      +            "type": "object"
      +          },
      +          "host": {
      +            "additionalProperties": true,
      +            "title": "Host",
      +            "type": "object"
      +          },
      +          "tab_id": {
      +            "description": "MCP tab id captured for this operation.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "host",
      +          "element",
      +          "tab_id"
      +        ],
      +        "title": "ShadowFindData",
      +        "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. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / timeout / type
      Previous value: -"integer"New value: +"number"
  3. Addedv0.7.2

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds only the shadow-root requirement and the 'supported DrissionPage runtime' caveat; it says nothing about timeout behavior, failure mode when the element is not found, or host/selector resolution order.

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 no padding; the verb and scope come first. The trailing qualifier about the 'supported DrissionPage runtime' is slightly vague but not wasteful.

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-value explanation is not required, and annotations cover safety. However, for a 4-parameter tool with implied failure semantics, the description omits timeout meaning and not-found behavior, leaving the definition minimally adequate rather than complete.

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 75% with four parameters, so the schema largely carries the load (host_selector, selector and tab_id are documented inline). The description adds no meaning beyond the schema — no explanation of what timeout=0 means or how the host_selector/selector pair is combined.

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 gives a specific verb ('Find') and resource ('one element inside a shadow root'), clearly scoping it to shadow DOM penetration, which distinguishes it from element_find. The 'one element' phrasing also implicitly separates it from shadow_find_all, though that sibling is never named.

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?

Usage is only implied: the phrase 'inside a shadow root' tells the agent to reach for this tool when a normal selector would fail. There is no explicit when-not guidance, no mention of shadow_find_all as the multi-element alternative, and no statement about what happens when the element is absent.

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