Skip to main content
Glama

match_screenshot

Compare a UI render to a baseline PNG pixel by pixel. Accepts per-channel tolerance, differing-pixel budget, and mask rectangles to ignore volatile regions. Returns diff stats and a diff-image preview on mismatch.

Instructions

Compare a UI's render against a baseline PNG (path on disk), pixel by pixel, with an optional per-channel tolerance, differing-pixel budget, and mask rectangles to ignore (volatile regions). Returns the diff stats and a diff-image preview on mismatch — a normal result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
masksNoRectangles to ignore when comparing (volatile regions), logical px.
themeNo
budgetNoAllowed differing-pixel fraction.
toleranceNoPer-channel tolerance (0 = exact).
descriptionYesThe UI description: a `fenestra/1` JSON object.
baseline_pathYesPath to the baseline PNG on disk.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the comparison operation and output, but does not mention side effects (e.g., read-only, destructive), required permissions, or behavior when baseline is missing. It is adequate but not fully transparent.

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 a single, concise sentence that includes all key aspects (comparison, baseline path, tolerance, budget, masks, return value). It is front-loaded with the main action, but its density could be slightly improved by splitting into two sentences.

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

Completeness3/5

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

Given the complexity and absence of an output schema, the description covers core functionality but misses details on the return format (e.g., diff stats structure) and prerequisites (e.g., baseline file existence, UI state). It is adequate for basic understanding but not fully 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?

The description adds meaning beyond the schema by explaining tolerance as per-channel, budget as allowed differing-pixel fraction, and masks as volatile region ignore. However, it does not cover all parameters (e.g., 'description' param is not mentioned). Schema coverage is 71%, so description adds good context.

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 clearly states the tool compares a UI render against a baseline PNG pixel by pixel, with specific optional parameters (tolerance, budget, masks) and return value. This distinguishes it from sibling tools like check_layout or match_aria_snapshot.

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 what the tool does but does not explicitly state when to use it versus alternatives, nor does it provide exclusion criteria. The purpose implies usage for visual regression testing, but no direct guidance is given.

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/richer-richard/fenestra'

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