Skip to main content
Glama

compare_images

Detect visual regressions by SSIM-comparing two image files. Get similarity score, changed regions, heatmap, and side-by-side preview to validate UI changes.

Instructions

SSIM-compare two image files (e.g. a Figma export vs a capture). Paths may be relative to the project root. Returns score, changed regions, a heatmap path and an a|b preview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alignNopad
image_aYes
image_bYes
thresholdNo
max_changed_ratioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly lists the return values: score, changed regions, a heatmap path, and an a/b preview, and clarifies that paths may be relative to the project root. It does not detail side effects like file creation, but this is a reasonable disclosure for a comparison tool.

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 with no filler. It front-loads the purpose, gives a concrete example, and then condenses path semantics and output behavior into one efficient second sentence.

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?

The description provides a solid starting point for basic use: it names the core purpose, example inputs, and all return values. However, with no output schema and no parameter explanation for three of the five parameters, an agent cannot fully understand how to control the comparison or interpret edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but it only addresses the input image paths. The optional parameters align, threshold, and max_changed_ratio are completely unexplained in both the schema and the description, leaving an agent without enough information to set them meaningfully.

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 states a specific verb and resource: 'SSIM-compare two image files', with a concrete example ('Figma export vs a capture'). This clearly differentiates it from siblings like compare_sets and ab_compare by focusing on a single pair of image files.

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 example of comparing a Figma export to a capture implies a primary use case and gives helpful context. However, it does not explicitly state when to prefer this tool over alternatives such as compare_sets or ab_compare, nor does it mention any exclusion criteria.

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