Skip to main content
Glama

a11y-toolkit: Snapshot regression diff

a11y_diff
Read-onlyIdempotent

Compare two accessibility snapshots to detect added, removed, or renamed interactives and focus-order changes, flagging regressions after a deploy for review.

Instructions

Regression diff between two accessibility snapshots (before/after a deploy): added/removed/renamed interactives and focus-order changes. ok=false means a regression to review. Accepts inline JSON (starting with "{") or file paths. — Compares two existing snapshots; a11y_diff_urls snapshots both for you. Returns JSON: {ok, added, removed, renamed, focus_order_changed, first_differences} — ok:false means a regression to review.

Input Schema

NameRequiredDescriptionDefault
aYesBEFORE snapshot (inline JSON or path)
bYesAFTER snapshot (inline JSON or path)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.3.0
    • changedInput schema / properties / a / description
      Previous value: -"Snapshot ANTES (JSON inline o ruta)"New value: +"BEFORE snapshot (inline JSON or path)"
    • changedInput schema / properties / b / description
      Previous value: -"Snapshot DESPUÉS (JSON inline o ruta)"New value: +"AFTER snapshot (inline JSON or path)"
  2. First observedv2.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered; the description goes further by disclosing input handling (inline JSON starting with '{' or file paths) and the meaning of the ok flag. It stops short of noting failure modes (malformed/incompatible snapshot versions) or large-payload limits, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded well, but content is duplicated: 'ok=false means a regression to review' appears in the opening sentence and again in the trailing return-shape sentence (via 'ok:false means a regression to review'). Trimming one occurrence would tighten it without losing 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?

With no output schema, the description carries the return contract and does so reasonably (ok, added, removed, renamed, focus_order_changed, first_differences). It does not explain the element format inside added/removed or how renames are detected, which a caller consuming the diff might want, but the essentials for correct invocation are present.

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

Parameters4/5

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

Schema coverage is 100% and already labels a/b as BEFORE/AFTER inline JSON or path, so baseline is 3. The description adds genuinely useful detail beyond the schema: the '{'-prefix heuristic for distinguishing inline JSON from a file path, which the schema does not state.

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 and resource ('Regression diff between two accessibility snapshots') and immediately scopes it ('before/after a deploy') with the concrete artifacts diffed (added/removed/renamed interactives, focus-order changes). It explicitly differentiates from the sibling a11y_diff_urls, so an agent can choose between them without opening schemas.

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

Usage Guidelines5/5

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

Gives the operative condition for this tool versus the alternative: 'Compares two existing snapshots; a11y_diff_urls snapshots both for you.' That is an explicit when-to-use/when-to-use-the-other split, plus interpretation guidance ('ok=false means a regression to review') that tells the agent what to do with the result.

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