Skip to main content
Glama

Snapshot Diff

diff

Compare browser pages against previous snapshots to detect changes. Returns additions, removals, and modifications to reduce token usage versus full re-capture. Supports CSS selector scoping.

Instructions

Compare the current page state against the last snapshot for this session. Returns only what changed (additions, removals, changes) — massive token savings vs a full re-snapshot. Use after 'act' instead of 'snapshot' when you just need to see what changed. On first call (no previous snapshot), returns the full snapshot with a note. Use 'selector' to scope the diff to a page region.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID.
selectorNoCSS selector to scope snapshot to a page region.
Behavior4/5

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

No annotations provided, so description carries full burden. Explains output behavior clearly (returns additions/removals/changes, token savings, first-call returns full snapshot). Implies read-only via 'Compare' and 'Returns', though could explicitly state no side effects.

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?

Four efficient sentences covering purpose, value proposition, usage guidelines, edge case, and parameter hint. Zero redundancy. Information density is high with no filler.

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 simple 2-param schema and no annotations/output schema, description adequately covers tool purpose, sibling differentiation, edge cases, and return value semantics. Could briefly mention error state if no session exists, but otherwise complete.

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 has 100% coverage (baseline 3). Description adds semantic context beyond schema: explains selector scopes to 'page region' (operational context) and session dependency via 'last snapshot for this session'. Adds meaningful value.

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?

Specific verb 'Compare' + resource 'current page state' + clear scope 'against the last snapshot'. Explicitly distinguishes from sibling 'snapshot' tool by explaining the delta/diff nature and token savings.

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?

Explicit when-to-use guidance: 'Use after act instead of snapshot when you just need to see what changed'. Clear alternative named (snapshot) and context (after act). Also covers edge case behavior for first call.

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/anthonybono21-cloud/leapfrog'

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