Skip to main content
Glama

compare_images

Compare two PNG files pixel by pixel to detect identical images or generate a side-by-side image with changed regions boxed in red and listed as text.

Instructions

Compare two PNG files pixel by pixel: "identical", or a side-by-side image with each changed region boxed in red, plus the regions as text.

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": {
      "before": "<before>",
      "after": "<after>",
      "out": "<out>"
    },
    "name": "compare_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
outYesWhere to write the side-by-side PNG.
afterYes
beforeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the output contract (the "identical" sentinel vs. side-by-side image with boxed regions plus text) and implicitly restricts inputs to PNG. However, it omits that the tool writes a file to disk at the out path, says nothing about what happens on mismatched dimensions or unreadable files, and gives no indication whether the text regions are returned or printed.

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?

A single front-loaded sentence that packs purpose, comparison method, and both output modes with no filler. The embedded quoted "identical" is slightly awkward but functionally clear; nothing needs to be cut.

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?

With no output schema and no annotations, the description is the only source of return-value and side-effect information, and it does cover the two response shapes. It is still incomplete for a tool that writes an output file: the destination-writing side effect, error behavior, and dimension-mismatch handling are left unaddressed.

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?

Only one of three parameters (out) is documented in the schema, so coverage is 33% and the description must compensate. It does clarify that before/after are PNG files compared pixel by pixel, which adds real meaning to the two undocumented string parameters, but it never explains their ordering or what out receives when images are identical.

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?

Uses a specific verb (compare) and resource (two PNG files) and states the dual outcome: the literal string "identical" or a side-by-side image with red-boxed changed regions plus a text list. The purpose is unambiguous. It falls short of a 5 because it never distinguishes itself from the siblings check_ui or view_image, which an agent could plausibly confuse with an image-inspection tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no when-to-use guidance and no exclusions or alternatives. It does not say to use this instead of view_image when the goal is diffing two versions, nor does it state prerequisites such as both files existing or being the same dimensions. An agent must infer all routing decisions.

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