Skip to main content
Glama

a11y-toolkit: PDF accessibility screening

a11y_audit_pdf
Read-onlyIdempotent

Screen local PDFs for accessibility failures: tagged structure, title, language, alt text, scanned text layers, encryption, and unlabeled form fields. Use it to catch blockers before full PDF/UA validation.

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. 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.3/5.0
Behavior5/5

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

Annotations establish read-only, idempotent, local-only, but the description adds substantial context beyond them: it discloses this is a zero-dep structural first pass (not full conformance), what specific failures it targets (/StructTreeRoot, /TU form labels), and the limits field in the output. The 'never fetched remotely' path constraint reinforces openWorldHint=false consistently.

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?

Purpose and the local-file scoping are front-loaded, and the dense clause list earns most of its space by enumerating concrete checks. It is information-heavy for a single opening sentence but not wastefully redundant.

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 usefully enumerates the returned JSON fields (pages, tagged, lang, alt_entries, form_labels, findings, summary, limits), which is exactly what an agent needs to interpret results. Complete enough; minor gap in not noting pagination/limits thresholds.

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% with only two parameters, both documented in the schema (local path, output language enum). The description reinforces the local-only nature of path but adds little syntax or format detail beyond what the schema already provides, so the 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?

States a specific verb and resource (PDF accessibility screening) and immediately distinguishes itself from HTML-based siblings like a11y_audit_url/a11y_audit_dom by noting axe/pa11y/Lighthouse are HTML only. An agent can tell this is the PDF-specific local-file auditor without opening the schema.

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?

Gives clear when-to-use context ('enterprise document pipelines and PDFs linked from the audited site') and sets a scope boundary by explaining full PDF/UA conformance needs veraPDF. It doesn't explicitly name a sibling alternative for HTML auditing, but the axe/pa11y contrast effectively implies when not to reach for this tool.

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