Skip to main content
Glama

click_shadow

Click the deepest interactive element inside a custom element's shadow DOM. Use when a button, radio, or checkbox is wrapped in one or more open shadow roots.

Instructions

Click the deepest interactive element inside a custom element's shadow DOM.

    Use when a page wraps a real ``<button>`` / ``[role="radio"]`` /
    ``[role="checkbox"]`` in one or more open shadow roots
    (``<nes-button>``, ``<sds-radio>``, ``<lion-input>`` and friends).
    ``selector`` should match the outer custom element in the light
    DOM; this tool then recurses through every nested ``shadowRoot``
    up to ``max_depth`` levels and dispatches a composed click
    sequence on the first interactive descendant it finds.

    Returns an error when the host isn't found or no inner interactive
    element lives inside its shadow tree.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYes
max_depthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Describes the recursion through shadowRoots and dispatch of a composed click sequence, and mentions error conditions. However, it does not disclose whether the tool waits for the element, scrolls, or handles asynchronous behavior, leaving gaps given no annotations.

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?

The description is concise, front-loaded with the main action, and uses clear examples. Could be improved with structured parameter notes, but overall efficient.

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

Completeness4/5

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

For a tool that handles shadow DOM recursion, the description covers behavior, parameters, and error cases adequately. Missing details about waiting or visibility are minor given the presence of an output schema (not shown) and the tool's specific niche.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning to both parameters: selector as the outer custom element and max_depth as recursion depth limit. This compensates for the lack of schema descriptions, though format details or defaults are not explicitly stated.

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?

The description clearly states it clicks the deepest interactive element inside a custom element's shadow DOM, distinguishing it from sibling tools like click and human_click which operate on normal DOM.

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?

Provides specific use cases (e.g., wrapping of buttons/radios/checkboxes in open shadow roots) and examples of custom elements, but does not explicitly state when not to use it or compare to alternatives like click_by_uid.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bituq/zendriver-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server