Skip to main content
Glama

compare_screenshot

Detect visual regressions by comparing the current page screenshot against a saved baseline, returning pixel diff percentage. Use update_baseline to save a new baseline.

Instructions

Compare the current page screenshot against a saved baseline. On first run (or with update_baseline=true) saves the baseline. Returns the pixel diff percentage. Install Pillow for accurate pixel comparison.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoBaseline name e.g. 'homepage'default
thresholdNoMax allowed diff % before failure
update_baselineNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It reveals the state-changing behavior (saving a baseline on first run or when update_baseline=true), the return value (pixel diff percentage), and a dependency caveat (Pillow for accuracy). It does not specify what happens when the threshold is exceeded or whether Pillow is required, which are minor gaps.

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 three sentences with no fluff. The first sentence front-loads the primary purpose, followed by side-effect, return behavior, and an implementation note. Every sentence earns its place.

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 no output schema and no annotations, the description is fairly complete: it explains the core comparison, baseline-saving behavior, return value, and dependency. It stops short of clarifying threshold-failure behavior and the exact role of Pillow, but overall it provides enough for an agent to invoke the tool correctly.

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

Parameters4/5

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

The schema already documents 'name' and 'threshold' well. The description adds meaning beyond the schema by explaining update_baseline=true saves the baseline, which is otherwise undocumented. It also connects the return value to the comparison, giving the threshold parameter practical context.

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 uses a specific verb ('compare') and a clear resource ('current page screenshot against a saved baseline'), which clearly separates it from sibling tools like take_screenshot. It also states the return value and the baseline-saving side effect, leaving no ambiguity about the tool's core function.

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 gives clear context for when to use the tool: to compare the current page against a saved baseline, including first-run or update_baseline=true behavior. It does not explicitly name alternatives or state when not to use it, but the use case is well implied and distinct from capturing a screenshot.

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

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/hakanngul/testfly-mcp'

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