Skip to main content
Glama

vrt_compare

Compare a webpage screenshot with a Figma or local design reference to detect visual differences and return diff percentage, image, and diagnostic analysis.

Instructions

Visual regression test: compare a page screenshot against a design reference. Captures screenshot of URL, compares with Figma design or local image using odiff. Returns diff percentage, path to diff image, and analysis for AI feedback loop.

Workflow:

  1. Provide design source (Figma or local file path)

  2. Tool captures page screenshot (with optional pre-actions)

  3. Compares using odiff

  4. Returns diff result with percentage, diff image, and diagnostic analysis

Features:

  • Retry with configurable wait strategy

  • Pre-actions (click, scroll, type, wait) before capture

  • Crop to specific element

  • Side-by-side comparison image

  • Smart analysis for high diff percentages

Use session_id to reuse cached design across iterations.

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": {
      "page_url": "<page_url>",
      "design_source": "<design_source>"
    },
    "name": "vrt_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
page_urlYesURL of the page to capture screenshot from
viewportNoBrowser viewport size. If not provided, auto-matches design image dimensions.
thresholdNoDiff threshold percentage (default: 1 means 1%)
session_idNoSession ID for caching. Reuse to skip re-fetching design.
wait_untilNoPage load strategy (default: 'networkidle')networkidle
pre_actionsNoActions to perform before capturing screenshot
retry_countNoNumber of retry attempts (1-3, default: 1)
retry_delayNoDelay between retries in ms (default: 1000)
antialiasingNoEnable antialiasing tolerance in odiff
design_sourceYesDesign reference source
crop_to_elementNoCSS selector of element to crop screenshot to
skip_design_fetchNoSkip fetching design, use cached version from session
wait_for_selectorNoCSS selector to wait for before capturing (graceful degradation on failure)
auto_match_viewportNoAutomatically set viewport to match design image dimensions. Default: true when viewport not specified.
generate_side_by_sideNoGenerate a side-by-side comparison image (design | screenshot | diff)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose retries with configurable wait strategy, pre-actions, caching across iterations, and smart analysis for high diffs, but it omits prerequisites such as Figma API credentials, any rate/time cost of headless capture, and whether screenshots or diff images are persisted to disk.

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 one-line purpose followed by workflow and feature lists, which is easy to scan for a 15-parameter tool. The workflow and features sections partially restate each other (capture/compare/retry), costing some redundancy without hurting clarity.

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 complex 15-parameter tool with no output schema, the description explains the return shape (diff percentage, diff image path, diagnostic analysis). What remains missing is the auth/credential requirement for the Figma path and any note on capture side effects.

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 description coverage is 100% and the nested design_source/pre_actions objects are well documented, so the baseline is 3. The description adds only marginal meaning beyond the schema, mainly the intent behind session_id reuse and the retry/caching relationship to skip_design_fetch.

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 and resource ('compare a page screenshot against a design reference') and names the underlying engine (odiff) plus what it returns. It is highly distinctive, but it never references the sibling vrt_session_info, so the session-related boundary is only implied through the session_id note.

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?

The numbered workflow gives a clear call sequence (design source -> capture -> compare -> result) and explicitly advises 'Use session_id to reuse cached design across iterations.' It stops short of when-not-to-use conditions or naming an alternative tool for session inspection.

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

Deploy Server

Other Tools