Skip to main content
Glama

dom.export

Read-only

Dump the entire DOM tree, including shadow roots and iframe documents, into an artifact for inspection or offline analysis.

Instructions

Dump the entire DOM tree, including shadow roots and iframe documents, to an artifact.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "dom.export"
  }
}

Input Schema

NameRequiredDescriptionDefault
save_pathNo
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
include_shadow_domNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuine scope context beyond that: the dump is recursive across shadow roots and cross-document iframes, and the result lands in an artifact rather than the response. It does not disclose output size/serialization cost or what the artifact handle looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the scope detail in a subordinate clause. Nothing is padded and the key differentiator (shadow roots, iframe documents) arrives immediately.

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?

For a zero-required-parameter, read-only export with no output schema, the description is adequate on what is captured but silent on how the caller retrieves or identifies the produced artifact (relevant given the artifact.read/list siblings) and on what save_path does by default.

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 coverage is 50%: target_id and browser_id are documented inline, while save_path and include_shadow_dom are not. The description partially compensates by implying shadow-DOM inclusion is a toggle ('including shadow roots'), but save_path and the default artifact destination are never explained.

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?

"Dump the entire DOM tree ... to an artifact" states a specific verb and resource, and the scope qualifier (shadow roots and iframe documents) tells an agent this is a full-fidelity capture, not a fragment. It stops short of naming how it differs from dom.get_html or dom.summary, so differentiation is left to inference.

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 implied rather than stated: the emphasis on 'entire DOM tree' including shadow and iframe content suggests this is the choice when complete structure is needed, as opposed to simpler DOM reads. There is no explicit when-to-use/when-not-to-use guidance and no sibling is named as an alternative.

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

Deploy Server

Other Tools