Skip to main content
Glama

a11y-toolkit: Snapshot regression diff

a11y_diff
Read-onlyIdempotent

Compare before and after accessibility snapshots to detect regressions in interactive elements and focus order. Returns ok=false when changes require 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.

Input Schema

TableJSON 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.6/5.0
Behavior4/5

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

Annotations already cover readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is known. The description adds valuable behavioral context beyond that: the meaning of 'ok=false' (a regression to review) and the accepted input formats (inline JSON starting with '{' or file paths). This enriches the agent's understanding of the tool's output and input handling without contradicting the annotations.

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 compact—two or three sentences—and front-loaded with the core purpose and outputs. It uses an em-dash to cleanly separate the alternative-tool note. Every sentence contributes value: purpose, output semantics, input format, and usage differentiation. No fluff or redundancy.

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 a simple two-parameter read-only tool with no output schema, the description covers the essential aspects: what it compares, how to interpret the result (ok=false means regression), and how to provide input. It mentions the specific change types (added/removed/renamed interactives and focus-order changes) which gives context on the diff output. The only minor gap is that it doesn't detail the full output structure beyond the ok field, but given the simplicity and the presence of the sibling tool note, this is sufficient.

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?

The input schema covers both parameters with descriptions ('BEFORE snapshot (inline JSON or path)' and 'AFTER snapshot (inline JSON or path)'), so the schema already documents the basics. The description adds a small but useful detail about inline JSON format (starting with '{'), which goes slightly beyond the schema. With 100% schema coverage, the baseline is 3, and this additional guidance justifies a 4.

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?

The description clearly states the verb (diff), resource (accessibility snapshots), and purpose (regression detection). It enumerates what is compared (added/removed/renamed interactives and focus-order changes) and explicitly differentiates from the sibling a11y_diff_urls by noting it compares existing snapshots while the other snapshots both. This gives an agent a precise understanding of the tool's role.

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?

The description explicitly names the alternative tool (a11y_diff_urls) and the condition for choosing it: 'a11y_diff_urls snapshots both for you.' It also states the typical use case (before/after a deploy) and that it requires existing snapshots, which tells an agent when this tool is appropriate and when another is needed.

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