Skip to main content
Glama

a11y-toolkit: A11y snapshot + tab order

a11y_snapshot
Read-onlyIdempotent

Capture an accessibility snapshot of any URL: interactive elements, tab order, and the screen-reader accessibility tree. Save before a deploy to compare with a11y_diff and verify WCAG compliance.

Instructions

Accessibility snapshot of a URL: interactive elements (tag, role, accessible name, href) in DOM order, the REAL tab focus order, and when Playwright ≥1.49 is available the computed ACCESSIBILITY TREE (aria snapshot — what a screen reader announces). Save it before a deploy and compare after with a11y_diff. Requires local Playwright. — Capture half of the watch loop; compare with a11y_diff (or a11y_diff_urls for two live URLs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesPage URL to snapshot (http/https or file://)
auth_stateNoPath to a Playwright storage_state JSON (exported session) to snapshot behind login

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.0.0
    • addedInput schema / properties / auth_state
      Added value: +{
      +  "description": "Path to a Playwright storage_state JSON (exported session) to snapshot behind login",
      +  "type": "string"
      +}
    • addedInput schema / properties / url / description
      Added value: +"Page URL to snapshot (http/https or file://)"
  2. First observedv2.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior. The description adds valuable behavioral context that annotations cannot convey: it requires local Playwright, behavior varies by Playwright version (≥1.49), and it reports the accessibility tree as what a screen reader announces. No contradiction with annotations.

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?

The description is informative and mostly well-structured, with the key output details front-loaded. It is slightly redundant by mentioning comparison with a11y_diff twice ('Save it before a deploy and compare after with a11y_diff' and 'compare with a11y_diff'), but it remains efficient and readable.

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

Completeness5/5

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

For a tool without an output schema, the description explains the output contents, the prerequisite environment, the version-dependent behavior, and the sibling tools to use for comparison. An agent has enough context to invoke it correctly and to route the result into the intended diff workflow.

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 parameters url and auth_state are already documented in the schema. The description adds context about the overall tool behavior and prerequisites, but does not materially deepen the meaning of either parameter beyond what the schema provides. Baseline 3 is appropriate.

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 uses a specific verb and resource: it captures an accessibility snapshot of a URL and enumerates exactly what it contains (interactive elements in DOM order, real tab focus order, and the computed ARIA snapshot when available). It is clearly distinct from sibling tools by emphasizing the snapshot-and-compare workflow rather than auditing or fixing.

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?

It gives explicit workflow guidance: 'Save it before a deploy and compare after with a11y_diff' and 'Capture half of the watch loop'. This tells the agent when in a process to call it. It does not enumerate exclusions versus every sibling tool, but the comparison and prerequisite guidance are strong.

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