Skip to main content
Glama

Diff a capture against its baseline

diff

Compares a named capture from a run against the promoted baseline for that scenario, reporting changed pixel counts and a bounding box while writing an image for review.

Instructions

Compare a named capture from a run with the promoted baseline for that scenario. Returns changed pixel counts and a bounding box, and writes a diff image. Does not decide if the change is acceptable.

Input Schema

NameRequiredDescriptionDefault
nameYes
run_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that the tool returns changed pixel counts and a bounding box and writes a diff image, and that it does not judge acceptability. However, it omits important behavioral details such as where the image is written, overwrite behavior, permission requirements, or what happens when no baseline exists.

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 tight sentences with no wasted language. It front-loads the core comparison, then states return values and side effects, then adds the key limitation.

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

Completeness3/5

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

For a two-parameter tool with no annotations or output schema, the description covers the main action, return summary, side effect, and a boundary condition. It still leaves gaps around parameter semantics, baseline-missing behavior, image output location, and overwrite behavior.

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 undocumented parameters. The phrase 'named capture from a run' only implicitly maps to name and run_id; it does not explain expected ID formats, whether run_id refers to a specific run record, or how capture names are scoped.

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 names a specific operation and resource: comparing a named capture from a run against the promoted baseline for its scenario. It is clearly a visual diff operation, but it does not explicitly distinguish itself from siblings such as capture, measure, or scenario_run.

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

Usage Guidelines3/5

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

The description implies when the tool is used: comparing a capture to its baseline. It also states a useful boundary, 'Does not decide if the change is acceptable,' but it does not name alternative tools or give explicit when-to-use/when-not-to-use routing guidance.

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