Skip to main content
Glama

a11y-toolkit: WebVTT caption quality

a11y_vtt_check
Read-onlyIdempotent

Download and parse WebVTT caption files to flag malformed timing, empty cues, overlaps, excessive reading speed, and incomplete coverage against media duration.

Instructions

WebVTT caption QUALITY (1.2.2) — the substance, not the presence. Everyone stops at " exists"; this downloads and parses the actual .vtt and judges what viewers get: malformed timing lines, empty cues, overlaps, impossible reading speed (>21 chars/second, BBC/Netflix standard) and coverage vs the media duration when given. Pass the .vtt URL (same http/https guard as the audits). An invalid header or incomplete download returns an error. Not a substitute for human review of accuracy or speaker identification. Returns JSON: {mode: "vtt", cues, characters, captioned_seconds, findings [{criterion, severity, signal, issue, remediation}], 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": {
      "url": "<url>"
    },
    "name": "a11y_vtt_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL of the .vtt caption file
langNooutput language
durationNomedia duration in seconds — enables the coverage check (1.2.2 completeness)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.8.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, but the description goes well beyond them: it discloses that the file is actually fetched and parsed, the http/https URL guard, the failure mode (invalid header or incomplete download returns an error), and the concrete reading-speed threshold of 21 chars/second. It even enumerates the returned JSON fields and a 'limits' section.

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?

The key differentiator (QUALITY, substance not presence) is front-loaded and emphasized, and the paragraph moves efficiently through method, guardrails, exclusions, and return shape. It is dense but nearly every clause adds information; the returned-JSON listing is the only slightly heavy portion.

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?

There is no output schema, yet the description supplies the return structure, the error behavior, and an explicit 'limits' element, so an agent knows both what it gets back and what the tool cannot judge. That covers everything needed to call this read-only analysis tool correctly.

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 description coverage is 100%, so each parameter is already documented. The description reinforces meaning by explaining what the duration parameter unlocks (coverage vs media duration), but adds little syntax or constraint detail beyond the schema's own text. Baseline 3 is appropriate when the schema carries the parameter burden.

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 chain (downloads, parses, judges) against a specific resource (the actual .vtt file) and scopes it to WCAG 1.2.2 caption quality. It explicitly distinguishes itself from mere presence checks ("Everyone stops at '<track> exists'"), so an agent can tell it apart from the audit-style 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It says when this tool is the right choice (assessing subtitle substance rather than existence) and when it is not ("Not a substitute for human review of accuracy or speaker identification"). It also notes the duration parameter activates the coverage check. It stops short of naming a concrete alternative tool for the presence-check case, which keeps it from a 5.

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