Skip to main content
Glama

a11y-toolkit: Oracle record (engine asks, someone answers)

a11y_oracle
Read-onlyIdempotent

Collects observation-backed answers to manual accessibility audit questions and returns a sealed record that marks each rule passed, failed, or cantTell.

Instructions

Semi-automatic oracle: the engine asks, someone answers with evidence. Takes an audit report with questions (the three approved ACT rules no automatic engine can decide because they require judging the content: qt1vmo image name is descriptive, c4a8a4 page title is descriptive, 0va7u6 images contain no text) plus answers [{question_id, answer yes|no, observation}] and returns the sealed a11y-oracle/1 record. A result is passed or failed ONLY when the answer cites a question_id of the report and brings an observation of its own (a repeat of the accessible name does not count); anything else is cantTell. An answer carrying an expected key is rejected (it would come from the official test-case file). The record is evidence under a seal: it never decides alone, never signs conformance and never enters the score. Verify it with a11yoracle.verify_record (Python). ACT import matches the current URL, HTML hash and rule questions. An omitted image question keeps the case inconclusive unless a reviewed image already fails. — Run after a static audit that came back with questions; answer only what you actually looked at (the image, the page). The record is sealed evidence of who answered and what they saw: verify it with a11yoracle.verify_record, feed it to scripts/act_report.py --answers, and never read it as a score or a conformance claim. Returns JSON: {format: a11y-oracle/1, mode: semiAuto, answered_by, subject, questions, questions_truncated? (omitted image questions), answers, results [{question_id, rule, criterion, signal, selector, result passed|failed|cantTell, reason, answer, observation, mode, answered_by, question}], summary {passed, failed, cantTell}, rejected_answers, unmatched_answers, note, sha256}. A result is passed or failed only for an answer that cites a question_id of the report and brings its own observation; an answer carrying an expected key is rejected, and an unanswered question stays cantTell. Say agent in answered_by when an agent with vision looked at the content: the W3C has not said whether it accepts such answers.

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": {
      "report": "<report>"
    },
    "name": "a11y_oracle"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNooutput language
reportYesaudit report object carrying a questions list (from a11y_audit_url on HTML: the static pass asks, the rendered pass does not)
answersNoone entry per question: {question_id (from the report), answer: yes|no, observation: what you saw that justifies it}; an answer carrying an expected key is rejected
answered_byNowho looked at the content and answered: human (default), agent (an agent with vision must say so) or a name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.39.0

TDQS

A4.7/5.0
Behavior5/5

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

Far beyond the readOnly/idempotent annotations: it discloses the pass/fail admission rule (valid question_id plus an independent observation), the cantTell default, that answers carrying an `expected` key are rejected, that omitted image questions stay inconclusive unless a reviewed image already fails, and the answered_by='agent' W3C caveat. The sealing semantics ('evidence under a seal... never enters the score') tell the agent how much authority to assign the output, which the annotations cannot convey.

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 core admission rule ('a result is passed or failed only when the answer cites a question_id and brings its own observation') is restated at least three times, and the verify_record pointer appears twice. The complexity justifies length, but several sentences could be collapsed without losing information; the front-loaded framing itself is good.

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 nested-object tool with no output schema, the description fully specifies the returned a11y-oracle/1 shape field by field, including summary counters, rejected_answers, unmatched_answers and sha256. Edge-case behavior (truncated questions, rejected answers, inconclusive results) is covered, leaving nothing an agent needs in order to call or interpret it.

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?

Schema coverage is already 100%, so the baseline is 3; the description still adds real meaning by stressing the observation requirement, the rejection of `expected`, and the significance of answered_by values (human default vs agent-with-vision). It does not add format or syntax detail for `report` beyond 'carrying a questions list', which the schema also states.

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 mechanism (semi-automatic oracle: engine asks, someone answers) and enumerates the exact three ACT rules it decides (qt1vmo, c4a8a4, 0va7u6) plus the inputs and sealed-record output. It is unmistakable against siblings like a11y_audit_url, which it explicitly positions itself downstream of.

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?

Gives an explicit trigger ('Run after a static audit that came back with questions'), a scoping instruction ('answer only what you actually looked at'), and a usage boundary ('never read it as a score or a conformance claim'), plus the downstream path (verify_record, act_report.py --answers). It also tells the agent where questions come from versus the rendered pass, so there is no ambiguity about when to reach for it.

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