Skip to main content
Glama

Audit page accessibility

audit-accessibility
Read-onlyIdempotent

Run axe-core on live pages (WCAG 2.2 AA by default), including behind login via storageState/actions, to return violations with Playwright locators, fixes, and regression checks.

Instructions

Run axe-core on a live page (WCAG 2.2 AA by default) and return violations worst first, each with the offending elements as verified Playwright locators, the fix, and a regression check to paste into a spec. Accepts storageState/headers/actions to audit pages behind a login or after a step.

Input Schema

NameRequiredDescriptionDefault
harNo
urlYesFull URL of the page to audit (http/https)
deviceNoPlaywright device preset, e.g. 'iPhone 15', 'Pixel 7', 'iPad Pro 11' (viewport, user agent, touch)
routesNoNetwork mocks, first match wins: json/body/status fulfil, abort fails, delayMs alone slows the real request
actionsNoSteps run in order after load to reach a state (modal, step 3). One call = one fresh browser, so include the login steps; end with a 'wait' on what the state shows
browserNoEngine (default chromium)
channelNoBranded Chromium to launch instead of the bundled one (must be installed)
headersNoExtra HTTP headers, e.g. Authorization
waitForNoWait for this selector first
selectorNoCSS selector: audit only this part of the page
standardNoRule set: WCAG level (default wcag22aa, i.e. 2.0–2.2 A+AA), 'best-practice' adds axe's extra rules, 'all' runs everything
viewportNo
minImpactNoHide violations below this impact (default: minor, show all)
timeoutMsNoOverall audit limit in ms (default 60000)
waitUntilNoNavigation wait condition (default load)
projectRootNoProject whose Playwright launches the browser (default: server root)
storageStateNoLogged-in session: storageState JSON inside the project, e.g. playwright/.auth/user.json
actionTimeoutMsNoHow long each action waits for its element (default 10000); keep timeoutMs above the total

Output Schema

NameRequiredDescriptionDefault
okYesfalse when the call failed (see error) or the tests it ran failed
urlNo
errorNo
violationsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.6.1
    • addedInput schema / additionalProperties
      Added value: +{}
    • addedInput schema / properties / actionTimeoutMs
      Added value: +{
      +  "description": "How long each action waits for its element (default 10000); keep timeoutMs above the total",
      +  "maximum": 120000,
      +  "minimum": 1000,
      +  "type": "integer"
      +}
    • changedInput schema / properties / actions / description
      Previous value: -"Steps run after load to reach a state (modal, step 3)"New value: +"Steps run in order after load to reach a state (modal, step 3). One call = one fresh browser, so include the login steps; end with a 'wait' on what the state shows"
    • addedInput schema / properties / browser
      Added value: +{
      +  "description": "Engine (default chromium)",
      +  "enum": [
      +    "chromium",
      +    "firefox",
      +    "webkit"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / channel
      Added value: +{
      +  "description": "Branded Chromium to launch instead of the bundled one (must be installed)",
      +  "enum": [
      +    "chrome",
      +    "chrome-beta",
      +    "msedge",
      +    "msedge-beta"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / device
      Added value: +{
      +  "description": "Playwright device preset, e.g. 'iPhone 15', 'Pixel 7', 'iPad Pro 11' (viewport, user agent, touch)",
      +  "maxLength": 60,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / har
      Added value: +{
      +  "properties": {
      +    "mode": {
      +      "description": "'replay' (default) answers requests from the file; 'record' saves the traffic",
      +      "enum": [
      +        "replay",
      +        "record"
      +      ],
      +      "type": "string"
      +    },
      +    "notFound": {
      +      "description": "replay: requests missing from the file abort (default) or go to the network",
      +      "enum": [
      +        "abort",
      +        "fallback"
      +      ],
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": ".har or .zip inside the project",
      +      "maxLength": 500,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "Glob limiting the requests, e.g. '**/api/**'",
      +      "maxLength": 500,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "path"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / routes
      Added value: +{
      +  "description": "Network mocks, first match wins: json/body/status fulfil, abort fails, delayMs alone slows the real request",
      +  "items": {
      +    "properties": {
      +      "abort": {
      +        "type": "boolean"
      +      },
      +      "body": {
      +        "maxLength": 200000,
      +        "type": "string"
      +      },
      +      "contentType": {
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "delayMs": {
      +        "maximum": 10000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "headers": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "json": {},
      +      "method": {
      +        "maxLength": 10,
      +        "type": "string"
      +      },
      +      "status": {
      +        "maximum": 599,
      +        "minimum": 100,
      +        "type": "integer"
      +      },
      +      "url": {
      +        "description": "Glob, e.g. '**/api/cart'",
      +        "maxLength": 500,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "hint": {
      +          "type": "string"
      +        },
      +        "kind": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "ok": {
      +      "description": "false when the call failed (see error) or the tests it ran failed",
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "type": "string"
      +    },
      +    "violations": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "count": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "help": {
      +            "type": "string"
      +          },
      +          "helpUrl": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "impact": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "impact",
      +          "help",
      +          "helpUrl",
      +          "count"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  2. Addedv0.4.2

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds useful behavior beyond them — result ordering (worst first), what each violation carries, and the auth/multi-step entry paths — but says nothing about runtime cost, rate/timeout limits, or failure modes of a live-page audit. Solid additive value, not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both front-loaded: capability and return value first, conditional entry paths second. No filler, and every clause carries information an agent needs.

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?

For an 18-parameter tool with nested objects and an output schema, the description covers the essential mental model: what is audited, how results are ordered, and how to reach authenticated or multi-step pages. Minor gaps (timeout budget, projectRoot/browser selection, selector scoping) are fully documented in the schema, so nothing blocking is missing.

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 89%, so the schema already documents nearly every parameter including defaults and enums. The description only gestures at the storageState/headers/actions trio by purpose (login, post-load state) rather than adding syntax or interaction details like the one-fresh-browser-per-call constraint. Baseline 3 is appropriate.

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 verb and engine ("Run axe-core on a live page") plus the default rule set (WCAG 2.2 AA) and the return shape (violations worst first with verified Playwright locators, fix, regression check). The accessibility-audit domain is unmistakably distinct from siblings like audit-performance and audit-tests, so an agent can select it 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?

The second sentence gives concrete usage contexts: pages behind a login (storageState/headers) or states reachable only after steps (actions). What is missing is explicit routing away from alternatives — nothing says "use audit-performance for timing" or when not to run this, so it stops short of the top band.

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