Skip to main content
Glama
getscreenshot-mcp

getscreenshot-mcp

Official
by rasterwise

Compare screenshots

compare_screenshots
Read-only

Compare two pages or screenshots to verify a change did what you intended and nothing else moved; returns changed-pixel percentage, bounding box, and diff image.

Instructions

Visual diff of two pages or two existing screenshots. Use it to verify a change did what you intended and nothing else moved: before/after a deploy, staging vs production, or one page at two points in time. Each side is either {url} (captured now) or {screenshot_url} (an earlier GetScreenshot result, reused at no cost; it is checked before any capture is spent). To compare a page across a change, capture it first, make the change, then pass the earlier screenshot_url as before and the page url as after. Returns the percentage of changed pixels, the bounding box of the changed area, and a diff image: the after image dimmed, changed pixels in magenta, a red rectangle around the changed area. When nothing changed no image is attached. Costs 1 screenshot of the monthly quota per side given as url (0 to 2 per call). Both sides are captured with the same viewport options. Takes about 9-25 seconds when it captures. Limits: pages must be publicly reachable. At most the top 2,400 px are compared (at up to 1280 px wide); for a lower part of a long page, capture that part of both versions with capture_screenshot and element, then compare the two screenshot_url values. Animations, ads and rotating content show up as differences; hide them with hide_selectors.

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>"
    },
    "name": "compare_screenshots"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterYesThe "after" image. Provide exactly one of url or screenshot_url.
widthNoViewport width in CSS pixels. API default 1280. Ignored when device is set.
beforeYesThe "before" image. Provide exactly one of url or screenshot_url.
deviceNoDevice preset: sets the viewport and, for phones, a mobile user agent. Overrides width and height. iphone* and pixel* are phones, ipad* are tablets, the rest are fixed desktop sizes.
heightNoViewport height in CSS pixels. API default 800. Ignored when device is set.
wait_msNoExtra wait in milliseconds after load, before the capture. API default 2000. Raise it for late animations or client-side rendering.
full_pageNoCapture whole pages instead of the viewport. Applies to sides given as url.
thresholdNoPer-pixel colour tolerance from 0 (any difference counts) to 1 (nothing counts). Default 0.1 ignores anti-aliasing noise.
wait_untilNoWhen the page counts as loaded. API default "networkidle2". Use "domcontentloaded" for heavy or slow sites (fastest, most reliable); "networkidle0" waits for all network activity to stop.
hide_selectorsNoCSS selector(s) to hide in both captures. Use it to remove things that change on every load (ads, carousels, timestamps) so they do not show up as differences.

Output Schema

NameRequiredDescriptionDefault
afterYes
beforeYes
imagesYesOne entry per inline image, in the same order as the image blocks.
comparedYesSize both images were normalised to before comparing.
warningsYesThings worth knowing about this result, for example an error status from the page.
identicalYesTrue when no compared pixel differs and both images have exactly the same width and height.
thresholdYes
truncatedYesTrue when images were requested and some slices were left out, because of max_slices or the inline size limit. Always false with return: "url_only", where no image is attached by request.
bounding_boxYesSmallest rectangle containing all changed pixels, in comparison-image pixels. Null when nothing changed.
size_changedYesTrue when the two images differ in size, for example the page got taller.
total_pixelsYes
total_slicesYesHow many slices the whole image needs at this detail level, whether or not they are attached. With return: "url_only" this is how many a normal call would produce.
changed_pixelsYes
changed_percentYesShare of compared pixels that differ, 0-100.
expires_in_daysYesStored files are deleted after this many days.
estimated_image_tokensYesApproximate total vision tokens of the inline images.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/idempotent=false, so the description carries real weight and does: quota cost of 0-2 screenshots per call, 9-25 second latency, the 2,400 px / 1280 px comparison cap, the public-reachability requirement, and that screenshot_url reuse is validated before any capture is spent. It also describes the exact return artifacts — changed-pixel percentage, bounding box, and the magenta-dimmed diff image, with no image when nothing changed — which is context beyond the annotations.

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?

Front-loads purpose and the core before/after recipe, then costs, timing, limits, and remedies in a logical order. It is dense and nearly every sentence carries operational value, though the return-format sentence and limits run long enough that an agent must read carefully rather than skim.

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 10-parameter, nested-object tool with an output schema, the description covers the things the schema cannot: quota economics, latency, capture limits, the no-change case, and the long-page workaround. An agent has everything needed to decide between url and screenshot_url inputs and to interpret the result.

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% and every parameter is already documented, including the exactly-one-of url/screenshot_url constraint and the device-overrides-width/height interaction. The description adds a little framing (both sides use the same viewport options; hide_selectors to suppress animations and ads) but mostly restates what the schema already says, so the baseline 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?

States a specific verb and resource ("Visual diff of two pages or two existing screenshots") and enumerates concrete use cases: before/after a deploy, staging vs production, one page at two points in time. It is clearly distinguishable from capture_screenshot and capture_pdf because the output is a diff, not an image capture.

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

Usage Guidelines5/5

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

Gives explicit when-to-use guidance (verify a change did what you intended and nothing else moved) and an ordered recipe: capture first, make the change, pass the earlier screenshot_url as `before` and the page url as `after`. It also names the alternative for long pages — capture_screenshot with `element` — and the hide_selectors remedy for noisy content.

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