Skip to main content
Glama

compare_pages

Compare two URLs to verify staging versus live or before versus after a deploy, returning screenshot, content, and performance diffs with pass/fail results.

Instructions

Compare two URLs in one call — staging vs live, before vs after a deploy. Loads both (optionally after the same interact_and_test steps, a consent action, and a device emulation), then returns: side-by-side full-page screenshots + pixel diff (passed vs max_diff_percent), a facts diff (title, meta description, canonical, H1s, hreflang, lang, robots, og tags, link/image/form counts), a visible-text diff (similarity + added/removed lines), performance metric deltas (b − a), transfer-weight delta, and same (true when screenshot, facts and text all agree). A side that fails to load is reported with its error while the other side is still captured in full.

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": {
      "url_a": "<url_a>",
      "url_b": "<url_b>"
    },
    "name": "compare_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsNointeract_and_test steps to run on BOTH pages before capturing (e.g. open a menu, switch language)
url_aYesFirst URL (e.g. staging)
url_bYesSecond URL (e.g. live)
deviceNoViewport preset or device name for both pages (see open_session.device)
consentNoHandle the cookie banner on both pages first
projectNoProject whose authenticated context loads url_a (and url_b unless project_b is given)
project_bNoProject for url_b when the two sites have different logins
thresholdNoPer-pixel colour tolerance 0-255 (default: 10)
run_checksNoAudit checks to run on both sides (visual, accessibility, functionality, seo, geo, performance) — adds issues[] per side and issue_count_delta
max_diff_percentNoScreenshot diff threshold for passed (default: 1.0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the whole burden. It does well on outcomes and partial failure ('a side that fails to load is reported with its error while the other side is still captured in full'), but says nothing about session requirements, authentication context beyond the `project` param, or expected runtime for a tool that loads two pages, runs steps, and captures full-page screenshots.

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 core action and use case, then a single dense sentence enumerating the return payload. The output list is long and run-on (hreflang, og tags, form counts), but each item helps an agent decide whether this tool covers its need, so little is truly wasted.

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?

With 10 parameters, no output schema, and no annotations, the description rightly spends most of its length describing what comes back. It covers partial failure and the `same` flag, but leaves open whether a session must exist first and what happens when both sides fail.

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 100%, so every parameter is already documented. The description adds modest meaning by explaining that steps, consent, and device apply to BOTH pages, and clarifies that `same`/`passed` depend on max_diff_percent — but most of the text restates return values rather than enriching parameter meaning.

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 concrete verb and resource ('Compare two URLs in one call') with an immediately recognizable use case (staging vs live, before vs after a deploy). The enumerated outputs — screenshot diff, facts diff, text diff, performance deltas — implicitly separate it from the screenshot-only sibling compare_screenshots, but no sibling is named explicitly.

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 clear situational guidance: deployment comparison, staging vs live, before vs after. It does not state when NOT to use it (e.g. when only a screenshot diff is needed, or when the two pages need different step sequences), so the agent must infer alternatives.

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