Skip to main content
Glama

a11y-toolkit: forced-colors survival heuristic

a11y_forced_colors
Read-onlyIdempotent

Test whether page content survives Windows High Contrast forced-colors mode by loading normally, emulating forced colors, and flagging SVGs with hardcoded fills that may disappear.

Instructions

Does content survive forced-colors: active (Windows High Contrast)? Loads the page normally, flags SVGs with hardcoded colored fills (they fall back to inherited and icons can vanish), then emulates forced-colors and compares. Review-grade heuristic — the definitive check is visual on Windows HCM; this prepares it. Heuristic rev 1: SVG fills only, images queued for the next rev. Returns JSON: {mode, normal, forced, score, findings, limits}.

Input Schema

NameRequiredDescriptionDefault
urlYesPage URL to test
langNooutput language
browserNoBrowser engine (auto = detect the first available)
timeoutNopage load timeout seconds (45 default)
auth_stateNoPath to a Playwright storage_state JSON (exported session) to test behind login — stays local

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.9.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly/idempotent/non-destructive/openWorld), and the description adds substantial context beyond them: the exact two-phase procedure, the finding that hardcoded SVG fills fall back to inherited and icons can vanish, the heuristic-vs-definitive caveat, and the revision-1 scope limit. It also notes auth_state stays local, useful for a login-gated test.

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?

Front-loaded with the core question the tool answers, then the mechanism, then the caveat, then the return shape. Every sentence earns its place; the revision-1 scoping note prevents a false expectation of image coverage and the inline JSON return list compensates for the absent output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description supplies the return shape ({mode, normal, forced, score, findings, limits}). Combined with the disclosed scope limits, the heuristic-vs-definitive framing, and annotations covering safety, an agent has everything needed to decide to call it and interpret the result.

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 100%, so the schema already documents url, lang, browser, timeout, and auth_state. The description only loosely gestures at url ('loads the page') and auth ('behind login') without adding syntax, defaults, or format detail beyond what the schema provides — the baseline 3 for schema-driven parameters applies.

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+resource: tests whether content survives forced-colors: active (Windows High Contrast), and details the mechanism (load normally, flag hardcoded SVG fills, emulate forced-colors, compare). This is a uniquely identifiable function among the siblings — no other tool covers forced-colors, so differentiation is inherent and the scope is precise.

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?

Clearly frames the tool's place: 'Review-grade heuristic — the definitive check is visual on Windows HCM; this prepares it,' which tells the agent when the result is sufficient and when it is not. It also states current coverage limits (SVG fills only, images deferred). It stops short of naming sibling tools for adjacent checks (e.g. contrast tools), so it is strong but not exhaustive on alternatives.

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