Compare two accessibility scans
diff_scanCompare two scans of the same page and report what changed: fixed[] (in the baseline, gone now), new[] (regressions — not in the baseline, present now), remaining[] (still there). Page-level complement to verify_fix (one element). Baseline is a scan_history id (baselineId, local installs) or a live scan of baselineUrl; current is url (scanned live now) or another history id (currentId). Live scans run a second time when they differ, and a difference that does not hold goes to unstable[], so a changed page can take twice as long. Findings are matched by issue id (rule + element), so a changed class/id on a fixed element reads as fixed AND new — check new[] before calling it a regression. Typical loop: scan_page → edit → diff_scan(baselineId=, url=) → confirm new[] is empty. Both live sides take the same cookies / interactions as scan_page, because a page behind a login is otherwise compared with its sign-in screen. A cookie without domain/url is scoped to each side's own host. NOTE: on this HOSTED server, localhost and private addresses are refused — it runs in our cloud and cannot reach your machine. Two ways to scan a local dev server: run the MCP locally (npx -y @webability/mcp, simplest — nothing leaves the machine), or open a tunnel (webability-tunnel --port 3000) and pass its URL as url together with the printed secret as tunnel_secret.
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": "diff_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to scan now as the CURRENT side (deployed, staging, or http://localhost:3000). Omit when passing currentId. | |
| wcag | No | Only these WCAG criteria. A prefix selects the whole guideline ("1.4") or principle ("2"). | |
| level | No | 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). | |
| rules | No | Only these rule ids (WebAbility type such as "missing_alt" or axe rule id such as "image-alt"). See get_rules. | |
| format | No | "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. | |
| context | No | Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution." | |
| cookies | No | Session cookies to load before the page opens, for pages behind a login or a consent gate (at most 20). Each entry is {name, value} and optionally {url} or {domain} (default: the scanned site) plus {path}. The server sets them on the browser context for this call only and never echoes a value: results name cookies by count, never by content. Nothing is stored after the scan. | |
| viewport | No | Viewport for live scans (default: desktop). Use the same viewport the baseline used. | |
| currentId | No | scan_history id to use as the CURRENT side instead of scanning `url` | |
| llm_model | No | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess. | |
| minImpact | No | Only findings at this severity or above (critical > serious > moderate > minor) | |
| baselineId | No | scan_history id of the BASELINE scan (local installs only) | |
| widgetView | No | Which DOM both live scans measure when the page embeds the WebAbility widget. "source" (default) blocks our widget; "applied" measures the visitor's patched view. Both sides must measure the same DOM — a source baseline against an applied current reports our widget's own patches as fixed/new, and the reply says so when the two sides disagree. | |
| baselineUrl | No | Scan this URL live as the baseline (e.g. production) — use when there is no stored baseline | |
| interactions | No | Steps to run on the page after it loads and before the scan, in order (at most 10, 20s total). Use this to get past a cookie banner, submit a sign-in, or open the panel you want measured. Each step is exactly one of {click: "css selector"}, {fill: {selector, value}}, {waitFor: "css selector"} or {wait: milliseconds}. The scan then measures the page those steps left behind and reports every step in "setup" (a failed step stops the list; the scan still runs and says so). Unlike dismissModals this is deterministic and yours, not a guess. | |
| rootSelector | No | CSS selector to limit live scans to (optional) | |
| tunnel_secret | No | Secret printed by `webability-tunnel`. Required when `url` is a tunnel URL; the URL alone will be refused by the relay. Ignored otherwise. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||