Scan an HTML snippet
scan_htmlScan a raw HTML snippet or component markup without serving it — IN-PROCESS by default (jsdom + WebAbility detectors + axe-core): milliseconds, no browser, no network, so it fits inside a tight edit loop. Fragments are auto-wrapped into a document. Returns scan_page's three-tier shape (issues / incomplete / summary) with fix.op + fixability on every finding. jsdom has no layout, so visual-tier rules (contrast, target size, focus ring) are NOT evaluated — the dropped count is reported as skippedVisual; pass engine: "browser" to run the axe-core headless-browser path for those (slower, axe rules only, returns axe violations).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | HTML content to test — a full document or a fragment | |
| tags | No | WCAG tags to check (default ["wcag2a","wcag2aa","wcag21aa","wcag22aa"]) | |
| wcag | No | Only these WCAG criteria. A prefix selects the whole guideline ("1.4") or principle ("2"). | |
| rules | No | Only these rule ids (WebAbility type such as "missing_alt" or axe rule id such as "image-alt"). See get_rules. | |
| width | No | Viewport width (browser engine only, default 1280) | |
| engine | No | "in-process" (default): jsdom, ms, structural rules. "browser": headless Chromium + axe-core, includes contrast. | |
| format | No | "compact" prints one line per element with rule metadata once — far fewer tokens than the default JSON. Default json. | |
| height | No | Viewport height (browser engine only, default 800) | |
| context | Yes | 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." | |
| llm_model | Yes | 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) | |
| conversation_id | No | Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. |