Skip to main content
Glama

Inspect DOM

browser_get_dom
Read-onlyIdempotent

Retrieve current HTML or text from a page region to inspect transient DOM state or hidden content. Requires acknowledging raw capture and a selector to narrow the scope.

Instructions

Use when current HTML or text for a page region is needed to understand transient DOM state, hidden content, or selector behavior. Preconditions: an active page and acknowledgeRawCapture: true are required; narrow with a selector when possible. Next: use browser_get_elements for actionable targets or compare DOM mutations in a trace. Sensitivity: raw DOM and text may contain secrets, personal data, hidden form values, or externalized artifacts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
maxBytesNo
selectorNo
acknowledgeRawCaptureNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
resultNo
Behavior5/5

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

The description adds a sensitivity warning about raw DOM containing secrets, personal data, etc., which goes beyond the annotations (readOnlyHint, idempotentHint, destructiveHint). It does not contradict annotations.

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?

The description is concise: three sentences covering purpose, preconditions/next steps, and sensitivity warning. Information is front-loaded and every sentence adds value.

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?

The tool has 4 parameters, an output schema, and annotations. The description covers purpose, usage guidelines, preconditions, and sensitivity, but lacks full parameter explanations. Output schema exists, so return values are documented. Overall fairly 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 coverage is 0%, so the description must compensate. It mentions acknowledgeRawCapture as required and selector as optional, but does not explain mode or maxBytes parameters. Partial guidance but insufficient for complete understanding.

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 the tool's purpose: to retrieve DOM HTML/text for a page region to understand transient state, hidden content, or selector behavior. It also distinguishes from sibling tool 'browser_get_elements' by specifying the different use case.

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 lists preconditions (active page, acknowledgeRawCapture: true), recommends narrowing with a selector, and suggests next steps (use browser_get_elements for actionable targets or compare DOM mutations). It covers when to use and when not, including alternatives.

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/ss26367098/rawtrace-mcp'

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