Skip to main content
Glama

screen_diff

Compare before and after screenshots to get an SSIM score, the share of pixels changed, and bounding boxes of changed regions. Verify that a UI change occurred and only where expected.

Instructions

Compare two screenshots or frames: returns an SSIM similarity score, the share of the image that changed, and bounding boxes of the changed areas in b's pixel coordinates, plus b inline with those areas outlined. Use it to check that a UI change happened (and only where expected).

Input Schema

NameRequiredDescriptionDefault
aYesThe 'before' image (or video: its first frame is used).
bYesThe 'after' image (or video). Scaled to a's size if it differs.
returnImageNoAlso return 'b' inline with the changed regions outlined in red (default true).
pixelThresholdNoHow different (0-255 mean) a cell of about 32x32 image pixels must be to count as changed (default 12: catches a changed label or a toast).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.39.0
    • changedInput schema / properties / pixelThreshold / description
      Previous value: -"How different (0-255 mean per 8 px cell, at ~320 px analysis width) an area must be to count as changed (default 12)."New value: +"How different (0-255 mean) a cell of about 32x32 image pixels must be to count as changed (default 12: catches a changed label or a toast)."
  2. First observedv0.32.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the full return payload, including the coordinate frame of bounding boxes (b's pixel coordinates) and the inline outlined overlay image. It never states that the tool is side-effect-free/read-only, which is the remaining gap.

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 dense sentences, front-loaded with the operation and its returns, followed by the single usage cue. No filler.

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, and the description compensates well by enumerating every returned value. Minor omission: the exact shape/format of the bounding boxes and behavior on dimension mismatch is left to the schema.

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%, so all four parameters are already documented in the schema, including defaults and the scaling rule. The description adds no parameter-level meaning beyond that, 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 (compare) and resource (two screenshots/frames) and enumerates the exact outputs: SSIM score, changed share, and bounding boxes. It is clearly distinguishable from siblings like wait_for_change or review_recording.

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?

Gives an explicit use case: verify that a UI change happened and only where expected. It does not name an alternative tool (e.g., wait_for_change for polling, review_recording for session replay) or state when not to use it.

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