Skip to main content
Glama
vKongv

Chrome Browser Control

by vKongv

Snapshot active page

snapshot

Retrieves a simplified DOM representation of the current page or a specified frame, giving a text preview or full text with metadata to inspect page structure and content.

Instructions

Return a simplified DOM snapshot for the current top document or an exact documentId from list_frames. Compact mode (default) returns textPreview only — not text. Full mode returns text. Compact defaults to main-landmark scope when present; a visible modal dialog (aria-modal=true or opened with showModal()) takes scope instead. Pass scope: "document" for legacy full-body text including the page behind a modal, ignoreRoles: ["dialog"] or ["alertdialog"] to hide both dialog and alertdialog, or mode: "full" for the unscoped legacy snapshot. Defaults truncate at 500 (compact) or 4000 (full) chars; pass textLimit (up to 100000) for long page content such as API docs. Response includes authoritative document identity and coordinate space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoSnapshot detail mode. Defaults to compact. Use full for text and verbose metadata, or visible for viewport-only refs, bounds, and labels.
scopeNoContent root for text and elements. Compact defaults to main when a main landmark exists, or to a visible modal dialog (aria-modal=true or <dialog> opened with showModal()). Use document for the page behind a modal; pass ignoreRoles: ["dialog"] or ["alertdialog"] to hide both dialog and alertdialog.
tabIdNoOptional Chrome tab id. Defaults to the claimed session tab, then the active tab.
textLimitNoMax body text characters. Optional; defaults to 500 (compact) or 4000 (full). Not a hard cap — maximum 100000.
documentIdNoExact frame document id returned by list_frames. Omit to target the current top document.
ignoreRolesNoComputed roles to exclude from scoped snapshots. Compact/main defaults to ["dialog"] when no visible dialog is open. A visible non-modal dialog is included without taking scope; a visible modal takes scope. Pass ["dialog"] or ["alertdialog"] to hide both roles, or [] to include them in the current scope.
sessionTabIdNoOptional claimed tab session id returned by claim_tab.
excludeSelectorsNoCSS selectors for subtrees removed from the scoped snapshot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well: it explains default scoping behavior (main landmark vs visible modal), default truncation limits (500/4000), the fact that textLimit is not a hard cap, and that the response includes 'authoritative document identity and coordinate space.' It also discloses that compact mode returns textPreview only, not text. The only minor gap is not describing the exact response shape or error conditions, but the description covers the most important behavioral traits.

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 dense but well-organized, front-loading the core purpose and then layering mode, scope, and limits. Every sentence adds information, and the structure mirrors the parameter hierarchy (mode → scope → textLimit → documentId). It is long, but the complexity of the tool (8 parameters, modal scoping rules) justifies the length. A slight trim could improve scannability, but it is not bloated.

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?

Given the tool's complexity (8 parameters, modal scoping, truncation, frame targeting), the description is remarkably complete. It covers defaults, edge cases (modal dialogs, legacy document scope), and the source of key identifiers (list_frames, claim_tab). There is no output schema, so the description's mention of 'authoritative document identity and coordinate space' gives a useful hint about the return value. It could mention error cases or the exact response structure, but for an agent deciding whether and how to call this tool, the description is sufficient.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining the interaction between scope and ignoreRoles (e.g., 'A visible non-modal dialog is included without taking scope; a visible modal takes scope'), and by clarifying that textLimit defaults differ by mode. It also explains the relationship between documentId and list_frames. This goes beyond the schema's per-parameter descriptions, so a 4 is warranted.

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 opens with a specific verb and resource: 'Return a simplified DOM snapshot for the current top document or an exact documentId from list_frames.' It clearly distinguishes the tool from siblings like visible_snapshot and query_elements by describing the snapshot's purpose and modes. The title 'Snapshot active page' is also expanded with concrete detail about what the snapshot contains.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly explains when to use compact vs full mode, when to pass scope: 'document' for legacy full-body text behind a modal, and when to use ignoreRoles to hide dialogs. It also names list_frames as the source for documentId and claim_tab for sessionTabId, giving clear context for when those parameters are needed. This is strong routing guidance that helps an agent choose the right invocation.

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