Skip to main content
Glama

Compare replica against original

compare_replica
Read-onlyIdempotent

Capture synchronized screenshots of the original and replica pages, then pixel-diff them to return match percentage and worst-matching regions.

Instructions

Screenshot the original website and a replica (local file or URL) at the same viewport with animations frozen, then pixel-diff them. Returns a match percentage, the worst-matching regions with coordinates, and a visual diff image. Use in a loop: build, compare, fix the worst regions, repeat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullPageNoCompare the full page instead of only the viewport.
thresholdNoPer-pixel RGB delta (sum of channel differences) above which a pixel counts as mismatched.
timeoutMsNoNavigation timeout in milliseconds.
userAgentNoOptional browser user-agent override.
waitUntilNoPage lifecycle event to await before extraction.domcontentloaded
autoScrollNoScroll through the page before extraction to trigger lazy-rendered content.
maxScrollsNoMaximum viewport-sized scroll steps when autoScroll is enabled.
replicaUrlNoURL of the replica, e.g. http://localhost:5173. Provide this or replicaPath.
maxHeightPxNoCap on the compared page height.
originalUrlYesAbsolute http:// or https:// URL of the original website.
replicaPathNoAbsolute path to a local replica HTML file. Provide this or replicaUrl.
viewportWidthNoBrowser viewport width in CSS pixels.
viewportHeightNoBrowser viewport height in CSS pixels.
allowPrivateNetworkNoAllow localhost and private-network URLs. Enable only for trusted sites.
allowPrivateReplicaNoAllow localhost/private replica URLs (the usual case for a dev server).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description adds behavioral details beyond annotations: animations frozen, same viewport, pixel-diff approach, and output contents. Annotations already declare read-only/idempotent hints, so the bar is lower; the description complements rather than repeats. It does not mention potential network access or timeout behaviors, but those are covered by parameters.

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?

Three compact sentences: action, output, and usage loop. Everything earns its place and the main purpose is front-loaded. No fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 15 parameters and an output schema, the description covers the core workflow and return values. It is complete enough to select and invoke correctly for the intended loop-based iteration. The output schema handles detailed return structure, so the description need not elaborate further.

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 description coverage is 100% with detailed parameter descriptions. The description adds minimal new parameter semantics; it mentions 'local file or URL' which aligns with replicaPath/replicaUrl, but otherwise the schema carries the burden. Baseline 3 is appropriate.

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+resource: 'Screenshot the original website and a replica... then pixel-diff them.' It clearly distinguishes from siblings like capture_screenshot by focusing on comparison and diffing. Returns are explicitly listed (match percentage, worst-matching regions, visual diff image).

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?

Provides a clear usage loop: 'Use in a loop: build, compare, fix the worst regions, repeat.' This tells the agent when to use the tool in an iterative workflow. It does not explicitly name alternative tools or when not to use it, but the context is strong.

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/blackridder22/PicassoWeb'

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