Skip to main content
Glama

a11y-toolkit: Deterministic safe auto-fixes

a11y_autofix
Read-onlyIdempotent

Apply safe, deterministic WCAG auto-fixes to HTML—unblocking viewport zoom, adding autocomplete tokens, filling lang and empty title. Returns fixed HTML plus applied and non-applied items with remediation.

Instructions

DETERMINISTIC safe auto-fixes applied to HTML — the honest anti-overlay: a short closed list of fixes where the correct answer is unique (unblock viewport zoom 1.4.4, add the exact autocomplete token 1.3.5, fill missing html lang and empty title when provided). Everything requiring judgment (alt text, contrast, accessible names) is NOT touched — it returns no_aplicados with the reason and remediation instead. Returns fixed_html + aplicados + no_aplicados. — Only the closed allowlist of provably safe fixes; judgment fixes come back as no_aplicados with remediation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesraw HTML to fix
langNoonly if provided and <html> lacks lang
titleNoonly if provided and <title> is empty

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.3.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already convey read-only, idempotent, open-world-false, and non-destructive behavior. The description adds genuinely useful context beyond those annotations: deterministic behavior, the exact return shape (fixed_html + aplicados + no_aplicados), and the no-op fallback behavior with remediation for judgment-based issues. It is consistent with 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.

Conciseness3/5

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

The content is front-loaded and information-dense, but it is somewhat repetitive: 'judgment fixes come back as no_aplicados with remediation' appears twice, and the 'closed allowlist of provably safe fixes' concept is restated. The description earns its place but would benefit from tighter editing.

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?

Despite having no output schema, the description explains the return fields and the fallback behavior for unsupported fixes. It gives concrete examples of what the closed allowlist includes, though it does not enumerate every possible fix. That is a minor gap, not a blocking one, since the tool communicates unsupported cases through no_aplicados.

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 coverage is 100%, so the parameters are already documented. The description adds a bit of context by mentioning lang and title as optional fill-ins, but it does not substantially extend the schema descriptions. This is the expected baseline-3 case.

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 states the exact verb and resource: it applies deterministic, provably safe auto-fixes to raw HTML. It also distinguishes itself from judgment-based accessibility work by explicitly excluding alt text, contrast, and accessible names, which separates it from the audit and analysis sibling tools.

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 clearly defines when to use the tool: only for the closed allowlist of fixes where the correct answer is unique. It also explains that judgment-requiring issues are returned as no_aplicados with remediation, signaling that the tool should not be relied on for those cases. It does not name specific alternative tools, but the boundary is explicit enough.

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