Skip to main content
Glama

Scan a page for accessibility issues

scan_page
Read-onlyIdempotent

Scan any web page URL, including localhost and staging, for WCAG accessibility issues with structured fixes and severity summaries.

Instructions

Scan a web page for WCAG accessibility issues. Works on any URL — deployed sites, localhost, staging. Returns issues (violations the scanner stands behind; findings the engines cannot decide are settled by the AI judge — a violation with a fix, or a pass recorded in judged[] with its reason — and anything unsettled is dropped, never listed for review) and a summary. On React ≤18 / Vue dev builds each issue carries source ({file, line, column, component}) read from the live component tree. Every issue carries a structured fix.op (add-attribute | set-attribute | remove-attribute | add-element | remove-element | add-text-content | suggest) with fix.attribute / fix.value when known, and a fixability tier (mechanical = apply as given; contextual = op known, value needs judgment; visual = needs rendered output, propose only).

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

Input Schema

NameRequiredDescriptionDefault
urlYesURL to scan (e.g. https://webability.io or http://localhost:3000)
wcagNoOnly these WCAG criteria. A prefix selects the whole guideline ("1.4") or principle ("2").
levelNoHighest WCAG conformance level to report. Default "AA" — Level AAA criteria are not reported. Pass "AAA" to include them (naming one AAA criterion in `wcag`, e.g. "3.2.5", also includes it).
rulesNoOnly these rule ids (WebAbility type such as "missing_alt" or axe rule id such as "image-alt"). See get_rules.
formatNo"compact" prints one line per element with rule metadata once. "json" returns every field (html, fix values, source). Default: JSON when it fits inline (under ~24k chars), otherwise compact plus a JSON summary of every count. On the hosted server the default is compact.
offsetNoStart the issue list at this index of the severity-sorted entries. The response carries `nextOffset` when more remain; pass it to read the next page. Default 0. Each call scans the page again, so on a live page the list can shift between calls; treat the offset as a position, not a snapshot.
viewportNoViewport size (default: desktop)
minImpactNoOnly findings at this severity or above (critical > serious > moderate > minor)
sourceRootNoLocal project root (local installs only). Issues without a framework `source` pointer get `sourceCandidates[]` — files whose contents match the selector's id/class/attribute tokens.
widgetViewNoWhich DOM to measure when the page embeds the WebAbility widget. "source" (default) blocks our widget so the scan sees the site's own markup. "applied" waits for the widget to finish patching and measures the visitor's view — slower, and reported as `widget.visitorVerified: true` only when the widget confirmed it had finished.
rootSelectorNoCSS selector to limit scan scope (optional)
storageStateNoLocal MCP only. Path to a Playwright storage-state JSON file (cookies + localStorage) for pages behind a login. Make one by logging in once: `npx @webability/cli flow <login-url> --save-storage-state auth.json`. The hosted server refuses this argument.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.11.1
    • addedInput schema / properties / storageState
      Added value: +{
      +  "description": "Local MCP only. Path to a Playwright storage-state JSON file (cookies + localStorage) for pages behind a login. Make one by logging in once: `npx @webability/cli flow <login-url> --save-storage-state auth.json`. The hosted server refuses this argument.",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv1.10.2
    • changedInput schema / properties / format / description
      Previous value: -"\"compact\" prints one line per element with rule metadata once. \"json\" returns every field (html, fix values, source). Default: JSON when it fits inline (under ~24k chars), otherwise compact plus a JSON summary of every count."New value: +"\"compact\" prints one line per element with rule metadata once. \"json\" returns every field (html, fix values, source). Default: JSON when it fits inline (under ~24k chars), otherwise compact plus a JSON summary of every count. On the hosted server the default is compact."
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Start the issue list at this index of the severity-sorted entries. The response carries `nextOffset` when more remain; pass it to read the next page. Default 0. Each call scans the page again, so on a live page the list can shift between calls; treat the offset as a position, not a snapshot.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / widgetView
      Added value: +{
      +  "description": "Which DOM to measure when the page embeds the WebAbility widget. \"source\" (default) blocks our widget so the scan sees the site's own markup. \"applied\" waits for the widget to finish patching and measures the visitor's view — slower, and reported as `widget.visitorVerified: true` only when the widget confirmed it had finished.",
      +  "enum": [
      +    "source",
      +    "applied"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changedv1.8.0
    • addedInput schema / properties / level
      Added value: +{
      +  "description": "Highest WCAG conformance level to report. Default \"AA\" — Level AAA criteria are not reported. Pass \"AAA\" to include them (naming one AAA criterion in `wcag`, e.g. \"3.2.5\", also includes it).",
      +  "enum": [
      +    "A",
      +    "AA",
      +    "AAA"
      +  ],
      +  "type": "string"
      +}
  4. Changed6 schema fields changedv1.7.0
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "\"compact\" prints one line per element with rule metadata once. \"json\" returns every field (html, fix values, source). Default: JSON when it fits inline (under ~24k chars), otherwise compact plus a JSON summary of every count.",
      +  "enum": [
      +    "json",
      +    "compact"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / minImpact
      Added value: +{
      +  "description": "Only findings at this severity or above (critical > serious > moderate > minor)",
      +  "enum": [
      +    "critical",
      +    "serious",
      +    "moderate",
      +    "minor"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / rules
      Added value: +{
      +  "description": "Only these rule ids (WebAbility type such as \"missing_alt\" or axe rule id such as \"image-alt\"). See get_rules.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / sourceRoot
      Added value: +{
      +  "description": "Local project root (local installs only). Issues without a framework `source` pointer get `sourceCandidates[]` — files whose contents match the selector's id/class/attribute tokens.",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"URL to scan (e.g. https://example.com or http://localhost:3000)"New value: +"URL to scan (e.g. https://webability.io or http://localhost:3000)"
    • addedInput schema / properties / wcag
      Added value: +{
      +  "description": "Only these WCAG criteria. A prefix selects the whole guideline (\"1.4\") or principle (\"2\").",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  5. First observedv1.3.1

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, destructiveHint=false, idempotentHint, and openWorldHint, so the safety profile is covered. The description then adds genuinely useful behavior: unsettled findings are dropped rather than queued for review, judged findings land in `judged[]`, fix.op and fixability tiers shape what the agent can act on, and offset paging is positional because each call re-scans a live page. The last point sits in mild tension with idempotentHint, though it describes page drift rather than tool side effects, so it is not a contradiction.

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 opening sentence is well front-loaded, but the second sentence is a single sprawling parenthetical that buries the judge/drop rule mid-clause. The fix.op and fixability enumeration is valuable yet could be broken into separate sentences rather than chained with semicolons.

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 12 parameters, no output schema, and open-world behavior, the description carries real weight and mostly delivers: it explains the `issues`/`summary` return shape, the `source` pointer availability, and the fixability model. Minor gaps remain, such as what `summary` aggregates and any rate or page-size limits on repeated scans.

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%, so every parameter already carries its own documentation, including the prefix semantics for `wcag`, the AAA inclusion rule, and the compact-vs-json default. The description adds no parameter-level detail beyond what the schema states, so the baseline applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource ("Scan a web page for WCAG accessibility issues") and immediately scopes inputs with "Works on any URL — deployed sites, localhost, staging." It is unambiguous what the tool does, but it never names or contrasts with adjacent scanners like scan_html, flow_scan, or visual_audit, so the agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance relative to the many sibling scanning tools. The only routing-adjacent facts are environmental constraints (storageState is local-only and refused by the hosted server), which describe limits rather than tool selection.

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