Skip to main content
Glama
aamar-shahzad

MCP Screenshot Server

compare_images

Compare two images to detect differences, returning the percentage of changed pixels and generating a highlighted diff image for visual regression testing.

Instructions

Compare two images and optionally create a diff image highlighting differences.

Returns the percentage of pixels that differ and creates a new image showing the differences if highlight_differences is True.

Useful for comparing before/after screenshots, detecting UI changes, or validating visual regression tests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thresholdNoColor difference threshold (0-255). Pixels differing by more than this are marked.
diff_colorNoColor to highlight differencesred
image_id_1YesID of the first image
image_id_2YesID of the second image
highlight_differencesNoCreate a diff image highlighting differences

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesStatus message
image_idYesID of the diff image created
identicalYesTrue if images are identical
difference_percentageYesPercentage of pixels that differ

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description must carry the full behavioral burden. It discloses that it returns a percentage and optionally creates a diff image, which covers the core behavior. It does not mention side effects like file persistence or permission needs, but for a comparison tool this is reasonably transparent.

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 concise and well-structured: first sentence states the main purpose, second details the output and conditional behavior, third provides context. No redundant or extraneous information.

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 the tool has an output schema, 5 parameters (2 required), and no annotations, the description covers purpose, behavior, and typical usage. It doesn't mention prerequisites like image loading, but those are implied by sibling tools and the parameter schema. Overall, it is sufficiently complete for an agent to call the tool correctly.

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%, so the schema already documents all parameters. The description adds no additional parameter-level detail beyond what the schema provides, making the baseline score of 3 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 tool compares two images and optionally creates a diff image. It specifies the verb 'compare', the resource 'images', and the key side effect. It distinguishes from siblings like create_side_by_side by focusing on difference highlighting rather than side-by-side presentation.

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 use cases ('comparing before/after screenshots, detecting UI changes, validating visual regression tests') which imply when it is appropriate. However, it does not explicitly exclude alternatives or state when to choose another tool, so it lacks the 'when-not' guidance required for a 5.

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