Skip to main content
Glama

Read page changes

read_page_diff

Compare a page snapshot with the previous one in a tab, frame, or document to identify added, removed, and changed nodes with refs; the first call or reset establishes the baseline.

Instructions

Compare a compact page snapshot with the previous snapshot in this session/tab/frame/document. First call or reset establishes a baseline. Returns added/removed/changed nodes with refs, explicit navigation resets and truncation. State is bounded in worker memory and lost on extension restart; comparisons are observations, not a complete DOM mutation log.

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": {
      "tabId": "<tabId>"
    },
    "name": "read_page_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
resetNo
tabIdYes
frameIdNo
maxCharsNo
maxResultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.24.1

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses baseline/reset semantics, returned categories (added/removed/changed nodes with refs, navigation resets, truncation), state lifetime ('bounded in worker memory, lost on extension restart'), and an accuracy caveat ('observations, not a complete DOM mutation log'). These are exactly the non-obvious traits an agent needs before relying on results.

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?

Four tight sentences, front-loaded with the core action and followed by baseline rules, return shape, and caveats. Dense but every sentence adds information; the 'session/tab/frame/document' enumeration is slightly redundant with the schema but costs little.

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?

There is no output schema, so the description must explain returns, and it does (added/removed/changed nodes with refs, resets, truncation), plus state persistence limits. For a 5-param, stateful diff tool this is close to complete; only the required `tabId` and the numeric bounds on maxChars/maxResults remain unexplained.

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% across 5 parameters, so the description must compensate. It explains the `reset` parameter's effect and implies `frameId` via 'session/tab/frame/document' and `maxChars`/`maxResults` via 'truncation', but does not cover `tabId` (the required parameter) or give any units, defaults, or limits for the size/count caps.

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?

States a specific verb+resource ('Compare a compact page snapshot with the previous snapshot') scoped to 'this session/tab/frame/document', which clearly separates it from a plain page read. It stops short of naming a sibling it is not (e.g., read_page) to route the agent, so it is clear but not maximally differentiating.

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

Usage Guidelines3/5

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

The sentence 'First call or reset establishes a baseline' implies the when-to-use case: use after an initial read to see what changed. However, there is no explicit guidance on choosing this over read_page or get_page_text, and no statement of when not to use it or what prerequisites (a prior snapshot in the same session) truly require.

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