Skip to main content
Glama

verify.assert_screenshot_diff

Assert that the pixel diff ratio between two PNG screenshots stays at or below a specified maximum, enabling automated visual regression verification.

Instructions

Compare two PNG screenshots and assert the pixel diff ratio is at or below maxDiffRatio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thresholdNo
actualPathYes
baselinePathYes
maxDiffRatioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-alpha.14

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of explaining behavior. It does communicate the core assertion behavior and the pass condition, but it does not explain what happens on failure, whether any files are written, or how the diff ratio is computed. Basic behavior is clear, but richer context is missing.

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?

The description is a single focused sentence with no wasted words. It front-loads the tool's purpose and the key assertion criterion. However, it is slightly too terse given the undocumented parameters.

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

Completeness2/5

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

Given no annotations, no output schema, and 0% schema description coverage, this description is too sparse. It does not explain the relationship between 'threshold' and 'maxDiffRatio', when this assertion should be used, or what the tool returns or throws on failure. The agent would need to guess at important invocation details.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for all four parameters. It only meaningfully explains maxDiffRatio, and even then it introduces ambiguity because the schema also contains an undocumented 'threshold' parameter. baselinePath and actualPath are inferable from the description, but 'threshold' is left completely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 two PNG screenshots and assert the pixel diff ratio is within a limit. The verb 'assert' and resource 'screenshot diff' make the operation specific. It does not differentiate itself from sibling verify.assert_* tools, but the screenshot-diff focus is distinct enough.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives, when it is appropriate to run, or what prerequisites are needed. The description simply states what it does, leaving the agent to infer usage from the tool name and sibling list.

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

Deploy Server

Other Tools