Skip to main content
Glama

compare_screenshots

Compare two screenshots pixel-by-pixel to detect UI regressions. Returns match percentage and a visual diff highlighting changes.

Instructions

Compare two base64 PNG screenshots pixel-by-pixel. Returns match percentage and a visual diff image highlighting differences. Useful for detecting UI regressions or verifying changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thresholdNoPer-pixel color tolerance 0-1 (default: 0.1)
screenshot1YesFirst base64-encoded PNG screenshot
screenshot2YesSecond base64-encoded PNG screenshot
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the core operation and return values, but gives no details on constraints, performance, or side effects. For example, it does not mention handling of corrupted images, file size limits, or whether the diff image is returned as base64 or a path. This is adequate but not rich.

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?

The description is two sentences, front-loaded with the primary verb and resource, and every sentence adds value. There is zero redundancy or 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 that there is no output schema, the description appropriately explains the return format (match percentage and diff image). It does not specify how the diff image is delivered (e.g., base64 string vs. file path), which is a minor gap. Overall, it is sufficiently complete for a straightforward comparison tool with well-described parameters.

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% for all three parameters (screenshot1, screenshot2, threshold), so the schema already documents them fully. The tool description adds no additional parameter-level semantics beyond what the schema provides, so a baseline 3 is appropriate.

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 action ('Compare two base64 PNG screenshots pixel-by-pixel') with a specific resource (screenshots) and method (pixel-by-pixel). It explicitly mentions the output (match percentage and visual diff image), distinguishing it from sibling tools like compare_personas_auto which compare personas rather than screenshots.

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 description provides clear usage context: 'Useful for detecting UI regressions or verifying changes.' This tells when to use the tool. However, it does not explicitly mention alternatives or when not to use it, stopping short of a full 5.

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/prembobby39-gif/userflow-mcp'

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