Skip to main content
Glama

compare

Read-onlyIdempotent

Compare before and after, or two regions. mode='before_after': the photo without its filters against the photo with them, whole or in a region, as per-channel mean and percentile changes, optionally with paired before/after preview images (include_previews). mode='regions': statistics for two named rectangles (region_a, region_b) on the current, filtered photo.

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": {
      "image": "<image>",
      "mode": "<mode>"
    },
    "name": "compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes'before_after': proxy base (no filters) vs proxy+filters, whole-image or `region` — per-channel stat deltas. 'regions': two rects on the SAME (filtered) image, stats for each, no delta (compare them yourself).
imageYesImage id, as returned by open_photo.
max_pxNobefore_after only. Long-edge cap for the proxy render, in pixels.
regionNobefore_after only. Restricts the comparison to this rectangle; default whole image.
channelsNoDefault: all four.
region_aNoregions only. First rectangle.
region_bNoregions only. Second rectangle.
include_previewsNobefore_after only. Also return paired before/after preview images (subject to privacy.send_previews_to_llm, same as preview).

Output Schema

NameRequiredDescriptionDefault
afterNo
deltaNo
proxyNo
beforeNo
region_aNo
region_bNo
previews_withheldNoPresent and true when the privacy setting kept the images from the model.
unmirrored_filtersNobefore_after only. Names of live filters that could not be re-attached on the "after" proxy render — the delta above is missing that filter's effect entirely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / previews_withheld
      Added value: +{
      +  "description": "Present and true when the privacy setting kept the images from the model.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered; the description still adds real value by disclosing that the 'before' side is a proxy render (capped by max_px), that 'regions' returns per-region stats with no delta because both rectangles come from the same filtered image, and that previews are gated by privacy.send_previews_to_llm. Return format and cost of generating previews are left to the output schema.

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?

Two sentences, front-loaded with the core verb and split cleanly by mode, with no filler. It is dense with backticked parameter names and parentheticals, which slows reading slightly but every clause carries information.

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?

For an 8-parameter tool with nested rectangles, enums and two distinct modes, the description covers both mode paths, the optional preview output and the channel/region scoping defaults, and an output schema exists so return values need not be explained. The one meaningful gap is that region coordinates are never stated to be in image pixels or relative to what origin/scale.

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 every parameter, including the nested region rectangles and their mode scoping, is already documented in the schema. The description largely restates the mode meanings and the include_previews option rather than adding coordinate units, image-space assumptions, or default reasoning beyond the schema.

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 verb (compare) and enumerates both resources precisely: unfiltered vs filtered render, or two rectangles on the current filtered photo. An agent can tell it apart from preview or get_histogram from the mode semantics, though no sibling is named explicitly as an alternative, so it stops short of full sibling differentiation.

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?

Each mode is tied to a condition: use 'before_after' to measure what the filter stack changed, use 'regions' to get statistics for two named rectangles on the already-filtered image. That gives clear context for selecting a mode, but there is no explicit exclusion or pointer to the sibling tools (preview, get_histogram) that overlap this use case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources