Skip to main content
Glama

Visual baseline: save or diff

compare_to_baseline

Compare a web page's current render against a saved visual baseline to detect pixel drift and layout changes. Returns a variance score, dimension drift, and a delta overlay for regression checking.

Instructions

Visual regression checkpointing. set_baseline renders the URL at the given breakpoint and saves a lossless PNG baseline; diff_against_baseline re-renders and pixel-diffs against it, returning a variance score, dimension drift, and a red-on-grayscale delta overlay that is also saved to disk. fullPage covers the whole scroll height as a separate baseline. Scroll is reset to the top first, so earlier interactions cannot misalign the comparison.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute URL to open, e.g. http://localhost:5173.
actionYesset_baseline saves the current render under the name; diff_against_baseline compares against it and returns drift metrics plus a delta overlay.
reloadNoReload even if the URL is already open (default reuses it, so it can be stale after an edit).
fullPageNoCapture the whole scrollable page instead of the visible fold. Clipped at 7900px, and the truncation is reported.
viewportYesBreakpoint: mobile 393x852, tablet 768x1024, desktop 1440x900, ultrawide 1920x1080.
baselineNameYesBaseline name, e.g. 'homepage'. Stored per-viewport under .agent-eyes/baselines/.
maxVariancePctNoCI gate for diff_against_baseline: FAIL when variance exceeds this percentage (0.5 = 0.5% pixel drift). Omit to report without a verdict.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that it saves files (baseline PNG and delta overlay), resets scroll to top, clips fullPage at 7900px with truncation reporting, and returns variance score, dimension drift, and delta overlay. It also mentions the reload default causing stale URLs. This is comprehensive, though it does not state permission requirements or reversibility explicitly.

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?

The description is four sentences and front-loads the core purpose, then adds details on behavior and edge cases. It is efficient and well-organized, though it could be tightened slightly without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with no output schema, the description is remarkably complete. It explains both actions, the return metrics (variance, dimension drift, delta overlay), the fullPage clipping limit, scroll reset, and the reload staleness issue. No critical information an agent needs to call it correctly is missing.

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 the baseline is 3. The description repeats parameter meanings (e.g., action, fullPage, maxVariancePct) without adding new semantics beyond the schema. It does not compensate for any gaps because there are none; it merely restates what the schema already provides.

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?

The description uses a specific verb-resource structure: 'set_baseline renders... and saves a lossless PNG baseline; diff_against_baseline re-renders and pixel-diffs against it, returning...'. It clearly distinguishes the two actions and differentiates from siblings like capture_page_screenshot or visual_diff_regions by naming the exact operations and outputs.

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 description explains the two actions and their behaviors (e.g., scroll reset, fullPage clipping) but does not explicitly state when to use this tool over alternatives like visual_diff_regions or capture_page_screenshot. No exclusions or conditional routing are provided, so the agent must infer usage from the action enum alone.

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