Skip to main content
Glama

get_dom_subtree

Extract the HTML of a specific DOM subtree at any recorded timestamp to diagnose UI disappearance or layout changes. Supply a CSS selector or node ID to retrieve that element's state from a session.

Instructions

Reconstruct and extract the HTML of a specific subtree (e.g. #app or .gpt-panel) at a given timestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoLogicalNodeId for the root of the subtree
selectorNoCSS selector for the root of the subtree
sessionIdYesSession ID
timestampNoTimestamp in milliseconds

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must convey behavioral traits itself. 'Reconstruct' communicates that the HTML is rebuilt from recorded session data and the output is HTML. However, it does not disclose behavior on missing nodes, invalid timestamps, or whether extraction has side effects, leaving some uncertainty.

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 concise sentence that front-loads the action and object, includes concrete examples for subtree selection, and specifies the temporal scope. There is no redundant or wasted wording.

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?

The description identifies the output (HTML) and the historical context, which is enough for a basic call. Yet it does not clarify how nodeId and selector relate, nor that only sessionId is required, leaving ambiguity about defaults when both selector and nodeId are omitted.

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 description coverage is 100%, so the schema already documents all four parameters; the baseline is 3. The description adds useful examples of subtree selectors and reinforces the timestamp concept, but does not substantially extend parameter meaning beyond the schema.

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?

Clearly identifies a specific operation: reconstruct and extract the HTML of a subtree at a historical timestamp, with concrete examples (#app or .gpt-panel). The timestamp qualifier distinguishes it from sibling get_live_dom_subtree, making the purpose unambiguous.

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?

The phrase 'at a given timestamp' clearly signals this is for historical/replay DOM extraction rather than live inspection, providing useful selection context. It stops short of explicitly naming get_live_dom_subtree as the live alternative or stating when not to use this tool.

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

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/IrMaho/Mcp-DOM'

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