Skip to main content
Glama

inspector.snapshot

Read-only

Captures a single-pass DOM snapshot with structure, layout, and selected computed styles across shadow roots and iframes, then writes it to an artifact for inspection.

Instructions

DOMSnapshot: structure, layout and selected computed styles in one pass, flattened across shadow roots and iframes. Written 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": "inspector.snapshot"
  }
}

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.
computed_stylesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds useful behavior by stating that results are flattened across shadow roots and iframes and written to an artifact, but it does not describe artifact naming, size implications, or how the artifact is later accessed.

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 two dense sentences with the core capability front-loaded. Every phrase contributes, though the leading 'DOMSnapshot:' label is slightly redundant with the tool name.

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 four-parameter tool with no output schema and only 50% schema description coverage, the description is adequate but incomplete. It explains flattening and that output goes to an artifact, but it leaves important operational details about save_path and computed_styles selection unstated.

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%, with target_id and browser_id already documented in the schema. The description partially compensates by mentioning selected computed styles and artifact output, which relate to computed_styles and save_path, but it does not explain the expected style-name format or whether save_path is a file path, artifact name, or directory.

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 specifies the resource and scope clearly: a DOM snapshot covering structure, layout, and selected computed styles, flattened across shadow roots and iframes. It distinguishes itself from generic page snapshots through the DOM-specific scope, though it does not explicitly name a sibling alternative.

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 explicit guidance about when to use this tool versus alternatives such as page.snapshot or inspector.accessibility_tree. The phrase 'in one pass' implies efficiency but does not tell an agent when this is the right choice or when it is not.

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