Skip to main content
Glama

Scan an HTML snippet

scan_html
Read-onlyIdempotent

Scan 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 shape (issues / 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

NameRequiredDescriptionDefault
htmlYesHTML content to test — a full document or a fragment
tagsNoWCAG tags to check (default ["wcag2a","wcag2aa","wcag21aa","wcag22aa"])
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.
widthNoViewport width (browser engine only, default 1280)
engineNo"in-process" (default): jsdom, ms, structural rules. "browser": headless Chromium + axe-core, includes contrast.
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.
heightNoViewport height (browser engine only, default 800)
contextNoExplain 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_modelNoThe 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.
minImpactNoOnly findings at this severity or above (critical > serious > moderate > minor)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • 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"
      +}
  2. Changed1 schema field changed
    • removedInput schema / properties / conversation_id
      Removed value: -{
      -  "description": "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.",
      -  "type": "string"
      -}
  3. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"\"compact\" prints one line per element with rule metadata once — far fewer tokens than the default JSON. Default json."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."
    • changedInput schema / required
      Previous value: -[
      -  "html",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "html"
      +]
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only cover safety (readOnly, idempotent, closed world); the description adds substantive behavior: jsdom has no layout so contrast/target-size/focus-ring rules are skipped, the dropped count surfaces as skippedVisual, and the browser path is slower, axe-only, and returns violations instead of the normal shape.

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?

A single dense paragraph, but the key fact (in-process, no browser, no network) is front-loaded and each clause carries real information. Slightly heavy but nothing is filler.

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 and no output schema, the description carries the return-value burden and largely discharges it by describing issues/summary, fix.op, fixability, skippedVisual, and the axe violations shape. Minor gaps remain around the analytics-only params, but the core call semantics are covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description enriches the engine parameter well beyond its schema text by tying it to which rules run and what output shape comes back (skippedVisual vs violations).

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 resource: scan a raw HTML snippet/component markup without serving it. It also implicitly separates itself from scan_page by noting it returns scan_page's shape, letting an agent tell the two apart without opening schemas.

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?

Gives clear when-to-use context — in-process is for a tight edit loop (milliseconds, no browser), and engine: "browser" is the escape hatch when visual-tier rules are needed. It does not explicitly say when to prefer scan_page over this tool, so no full alternative routing.

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.