Skip to main content
Glama

pixel_diff

Compare screenshots pixel-by-pixel to detect visual changes. Save a baseline, then compare later states to get a diff image with changed pixels highlighted in red.

Instructions

Compare screenshots pixel-by-pixel. First call with action 'save_baseline' to save current state, then make changes, then call with action 'compare' to see what changed. Returns diff image with changed pixels highlighted in red.

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": {
      "action": "<action>"
    },
    "name": "pixel_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPage URL. Auto-detected if omitted.
nameNoBaseline name for multiple baselines. Default: auto-generated.
actionYessave_baseline to save current state, compare to diff against saved baseline.
selectorNoCSS selector for element-level diff.
viewportNoViewport. Default: desktop.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 disclosure burden. It does add useful behavior: save_baseline persists state, compare diffs against it, and the result is a diff image with changed pixels in red. It omits overwrite semantics for repeated save_baseline calls, baseline storage/lifetime, and failure behavior 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?

Three short sentences, front-loaded with the core operation, then the workflow, then the return value. Every sentence contributes and nothing is padded.

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, yet the description compensates by stating the return is a diff image with red highlighting. Combined with full schema coverage and the explicit two-phase workflow, an agent can invoke it correctly; only edge-case behavior (missing baseline, baseline reuse) is unaddressed.

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 five parameters including the viewport and action enums are already documented in the schema. The description reinforces the action semantics via the workflow but adds no new syntax or format details for url, name, or selector 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?

States a specific verb and resource: 'Compare screenshots pixel-by-pixel' with the two actions named. It is clearly distinguishable from generic siblings like screenshot, though it never explicitly contrasts itself with smart_diff, the closest conceptual neighbor.

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 procedural sequence: call with 'save_baseline' first, make changes, then call with 'compare'. This is real when-to-use guidance, but it offers no exclusions such as when to prefer smart_diff or what happens if compare is called before a baseline exists.

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