Skip to main content
Glama

Screen reader script

screen_reader_script
Read-only

Read HTML (pass html, or a public url) and return a linear approximation of what a screen reader announces, in document order: landmarks, headings with levels, links, buttons, form controls with accessible names and states (required, expanded, checked, disabled and more), images with alt, lists and tables. Accessible names are computed in a simplified way (aria-labelledby, aria-label, label for or wrapping label, alt, title, text content); aria-hidden, hidden and inline display:none are honored. Problems are flagged inline: no accessible name, generic link text, duplicate landmark with no label, skipped heading level, name from placeholder only, missing alt, table without header cells. Output is capped at the first 250 nodes, with a count of those omitted. This is an approximation of the accessibility tree built from static markup, not a recording of NVDA, JAWS or VoiceOver; it does not run script or apply stylesheets. Returns an object with report (the script as text), nodes and counts.

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": "screen_reader_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic page to fetch instead of pasting HTML
htmlNoHTML of the page or component to read

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: discloses the 250-node output cap with an omitted count, how accessible names are computed (aria-labelledby, aria-label, label wrapping, alt, title, text), that aria-hidden/hidden/display:none are honored, and the exact set of inline-flagged problems. Also explicitly bounds fidelity by naming what it does not do (no script execution, no stylesheet application, no real AT recording).

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 core action and return shape before the detail, and every clause carries technical content (name computation order, honored hiding attributes, flagged issue list, node cap). It is a single long paragraph and the flag-type enumeration is dense, but nothing is padding.

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 supplies the return contract itself: an object with `report` (script as text), `nodes`, and counts, plus the truncation behavior. Combined with the fidelity caveats and name-computation rules, an agent has everything needed to call it and interpret results 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 coverage is 100% and both parameters are already documented in the schema, so the description adds little: it restates that `url` is a public page and `html` is the markup to read. The 'pass html, or a public url' phrasing hints at the either/or input choice, but no precedence rule is given 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?

Specific verb+resource+output: 'Read HTML (pass `html`, or a public `url`) and return a linear approximation of what a screen reader announces, in document order'. The enumerated output contents (landmarks, headings, links, controls, tables, flagged issues) make it immediately distinguishable from siblings like audit_page_accessibility, site_heading_outline or check_reading_order, which diagnose rather than narrate.

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 states both input modes (paste `html` or fetch a public `url`) and gives a clear scope exclusion: it is an approximation built from static markup, does not run script or apply stylesheets, and is not a recording of NVDA/JAWS/VoiceOver. That effectively tells the agent when not to rely on it (JS-rendered pages), but it never names an alternative sibling tool for those cases.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources