Skip to main content
Glama

get_dom_state

Fetch the DOM snapshot HTML closest to a timeline millisecond to inspect page state at that moment; returns path and capped HTML, with max_chars for more.

Instructions

DOM snapshot HTML nearest to a timeline ms (snapshots at nav/mark/every 30s). Returns path + html, capped — pass max_chars for more. For visuals prefer get_shot/keyframes

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "t_ms": "<t_ms>"
    },
    "name": "get_dom_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
t_msYes
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.7.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "type": "number"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful traits: snapshot cadence (nav/mark/every 30s), nearest-snapshot selection rather than interpolation, and that output is capped. It omits what happens when no snapshot exists near t_ms (error, empty, or fallback) and the default/exact cap value, which are the behaviors most likely to surprise a caller mid-run.

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?

Front-loaded with the outcome and return shape, then sampling behavior, then the alternative. Very little waste, though the telegraphic fragments ('snapshots at nav/mark', 'capped — pass max_chars for more') trade a bit of clarity for density.

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?

For a two-parameter read tool with no annotations and no output schema, the description covers return shape, sampling cadence, truncation, and escalation via max_chars. The main residual gap is the no-snapshot-found behavior and cap defaults.

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 coverage is 0%, so the description must define both parameters, and it does: t_ms is a timeline millisecond resolved to the nearest snapshot, and max_chars raises the output cap. Only the default cap value and any unit/upper-bound constraints remain undefined.

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?

States a specific verb+resource ('DOM snapshot HTML') and a precise selection rule ('nearest to a timeline ms'), and explicitly distinguishes itself from get_shot/keyframes for visual needs. An agent can tell exactly what this returns (path + html) without opening the schema.

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?

Gives a clear routing rule for alternatives ('For visuals prefer get_shot/keyframes') and implies when this tool is right (you need DOM HTML at a point in time). It does not spell out a when-not case for DOM itself, e.g. whether to prefer events_around or session_md for structural context.

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