Skip to main content
Glama

a11y-toolkit: PDF accessibility screening

a11y_audit_pdf
Read-onlyIdempotent

Screen local PDFs for accessibility failures by checking tags, title, language, alt text, text layer, encryption, and form labels; returns JSON findings for document pipelines.

Instructions

PDF accessibility screening — the space nobody automated (axe, pa11y, Lighthouse: HTML only). Zero-dep structural first pass on a LOCAL file: tagged tree (/StructTreeRoot — the root failure), title, language, outline, /Alt entries, text layer (scanned detection), encryption, and AcroForm fields without accessible labels (/TU — what a screen reader announces; 3.3.2 inputs, 4.1.2 buttons). Full PDF/UA conformance needs a spec validator (veraPDF); this finds the failures that make full validation pointless. Use for enterprise document pipelines and PDFs linked from the audited site. Inputs over 30 MB return an error before scoring. Returns JSON: {mode: "pdf", pages, tagged, lang, title, images, alt_entries, form_fields, form_labels, findings, summary, limits}.

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": {
      "path": "<path>"
    },
    "name": "a11y_audit_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNooutput language
pathYeslocal PDF file path (never fetched remotely — download it yourself first)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.8.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish a safe, idempotent read with no network access, but the description adds real behavioral context beyond them: the 30 MB error-before-scoring limit, the requirement that the file be local (never fetched), the limitation versus a spec validator, and an explicit enumeration of the returned JSON keys. Nothing material about execution behavior is left undisclosed.

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?

Front-loaded with purpose, then scope, then checks, then limitations, then return shape — a sensible order with no filler sentences. The middle check list is a long parenthetical run-on that is dense to parse, which keeps it from a 5, but every clause (4.1.2 buttons, 3.3.2 inputs, scanned detection) carries information.

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?

Although there is no output schema, the description spells out the JSON envelope keys (pages, tagged, lang, title, images, alt_entries, form_fields, form_labels, findings, summary, limits) so the agent knows the return shape. Combined with annotations covering safety and the stated size/network limits, nothing needed to call this correctly is missing.

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%, and the schema already carries the key semantic ('local PDF file path (never fetched remotely — download it yourself first)'), so the description's 'LOCAL file' phrasing largely restates it. The description adds a rationale for why local matters (zero-dep structural pass) but no new meaning for 'lang' or 'path' beyond the schema, so the baseline of 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 names a specific verb and artifact ('PDF accessibility screening' on a 'LOCAL file') and enumerates exactly what is checked: tagged tree via /StructTreeRoot, title, language, outline, /Alt, text layer, encryption, AcroForm /TU labels. It also draws the boundary against HTML-only scanners (axe, pa11y, Lighthouse), so an agent can tell it apart from the DOM/URL auditing siblings without opening a schema.

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?

Usage is explicit: use for enterprise document pipelines and PDFs linked from the audited site, on a local file you downloaded yourself. It also states when the tool is not sufficient ('Full PDF/UA conformance needs a spec validator (veraPDF)') and why it is still worth running ('finds the failures that make full validation pointless'), plus the 30 MB hard cutoff.

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