Skip to main content
Glama

browser_compare_screenshots

Compares two screenshots or PNGs to count changed pixels, measure change ratio, and locate the changed area via bounding box, with an optional diff image saved to disk.

Instructions

Deterministic visual comparison of two screenshots or PNG images. Calculates changed pixel count, changed ratio, and bounding box without Vision LLM overhead.

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": {
      "image1": "<image1>",
      "image2": "<image2>"
    },
    "name": "browser_compare_screenshots"
  }
}

Input Schema

NameRequiredDescriptionDefault
image1YesFile path, data URL, or base64 of first screenshot
image2YesFile path, data URL, or base64 of second screenshot
diff_output_pathNoOptional file path to save a visual diff highlight PNG
channel_thresholdNoPer-channel RGBA sensitivity delta (0-255)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.0

TDQS

A3.8/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. It helpfully characterizes the operation as 'deterministic' and enumerates the metrics produced, but it does not disclose that supplying diff_output_path writes a file to disk, nor what happens if the images differ in dimensions or fail to load.

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?

Two tightly written sentences with zero filler; the core operation leads and the differentiator follows immediately. Nothing could be removed without losing 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?

No output schema exists, but the description explicitly names the three return values (changed pixel count, changed ratio, bounding box), which covers most of what an agent needs to know about the result. It stops short of describing the response shape for the saved diff image, keeping it just below a 5.

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 coverage is 100%, so all four parameters (image1, image2, diff_output_path, channel_threshold) are already fully documented in structured data, including the default and range for the sensitivity threshold. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

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?

A specific verb ('visual comparison') with a clearly delimited resource ('two screenshots or PNG images'), plus an enumeration of the exact computed outputs (changed pixel count, ratio, bounding box). It is unmistakably distinct from sibling browser_screenshot, which captures rather than compares.

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 phrase 'without Vision LLM overhead' implies the situation this tool is meant for — pixel-exact diffing rather than model-based interpretation — but the description never states an explicit when-to-use or when-not condition, and never names an alternative such as browser_snapshot or browser_screenshot.

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