Skip to main content
Glama

a11y-toolkit: Tool router (goal or page to steps)

a11y_route
Read-onlyIdempotent

Maps a plain-language accessibility goal or page URL/HTML to an ordered sequence of toolkit steps, explaining why each step is needed and which tests to run next.

Instructions

The router — start here when unsure which tool solves a task: state the goal in plain language ("gate my PR", "fix the contrast of my hero", "generate the legal statement") and get the ordered tool sequence with the why of each step. Deterministic keyword index over the toolkit map, not an LLM guessing; when nothing matches, the honest fallback route says where everyone begins. Makes 33 specialized tools an O(1) choice — ask once instead of scanning descriptions. Optional sequential-diagnosis mode: pass url or html and the router takes the page's cheap vitals (static pass) and orders the next exams by expected yield — the evidence decides (forms → form error testing, menus → keyboard, video → caption content), severity only breaks ties; the ordered plan never replaces the full catalog. Returns JSON: {route, steps [{step, tool, why}], alternates, prompts, cli, note} — the ordered tool sequence for the goal. Diagnosis mode (url/html passed): {mode: diagnose, vitals {score, summary, signals}, symptoms [{symptom, evidence}], steps [...], guarantee} — evidence orders the exams, severity breaks ties.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "a11y_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNooptional diagnosis mode: page URL — its cheap signals (static pass) order the next exams by expected yield
goalNothe task in plain language (es or en)
htmlNooptional diagnosis mode: inline HTML instead of a URL
langNoOutput language (en default)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.19.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the core mechanic -- a deterministic keyword index, explicitly not an LLM guess -- and defines the two modes and how the optional params flip between them. It also explains why the diagnostics mode orders exams by expected yield with severity only as a tiebreaker, which is behavior an agent could not infer from 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?

Front-loaded with the action and the entry-point claim, and every clause carries routing information. It runs long, however, and the two return-shape listings restate structure that could be tightened into one line.

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?

No output schema exists, so the description carries the full burden of describing returns -- and it does, enumerating keys for both the routing and diagnosis responses. For a 4-param, zero-required tool with rich annotations, nothing an agent needs to call it correctly is missing.

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 100%, so the baseline is 3, but the description adds genuinely new meaning: passing url or html does not merely filter -- it switches the whole response shape into diagnosis mode with vitals, symptoms, and a guarantee. It is slightly less precise about the `goal` vs diagnosis-mode interaction (which param wins if both are supplied).

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?

It names a specific role -- a router that maps a plain-language goal to an ordered tool sequence -- and states plainly that it is the entry point rather than an auditing tool, so it is distinguishable from all 33 siblings at a glance. Concrete examples of goals ("gate my PR", "fix the contrast of my hero") anchor what kind of input is expected.

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?

It gives an explicit trigger ("start here when unsure which tool solves a task") plus an important restraint ("the ordered plan never replaces the full catalog") and a fallback behavior when nothing matches. That is when-to-use, when-not, and what-happens-otherwise in one paragraph.

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