Skip to main content
Glama

compare_screenshot

Compare the current page screenshot with a saved baseline to detect visual differences. Returns pixel diff percentage; saves baseline on first run.

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
update_baselineNo
thresholdNoMax allowed diff % before failure
Behavior3/5

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

With no annotations provided, the description must carry the full burden. It discloses that it saves baselines and returns a diff percentage, and requires Pillow. However, it does not explain what happens when the baseline does not exist (beyond first run) or the failure behavior when the threshold is exceeded, leaving some behavioral 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, no filler. It front-loads the purpose, then addresses behavior and prerequisite efficiently. Every sentence adds value.

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?

For a simple tool with 3 parameters and no output schema, the description covers the core logic, baseline lifecycle, and return value. A minor gap is lack of detail on baseline storage persistence or error handling when no baseline exists, but overall it is adequately complete.

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?

Schema description coverage is 67% (name and threshold have descriptions, but update_baseline does not). The description adds meaning for update_baseline by linking it to baseline saving behavior ('or with update_baseline=true saves the baseline'), which the schema omits. This improves agent understanding beyond the raw schema.

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's purpose: 'Compare the current page screenshot against a saved baseline.' It uses a specific verb (compare) and resource (screenshot with baseline), distinguishing it from sibling 'take_screenshot' which only captures a screenshot without comparison.

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 context for using the tool, such as first-run behavior and the update_baseline parameter. It also notes a prerequisite ('Install Pillow'). However, it does not explicitly contrast with alternative tools or state when not to use it, but there are no direct siblings that perform visual comparison.

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

Install Server

Other Tools

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/seleniumboot/selenium-mcp'

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