Skip to main content
Glama

audit_contrast

Read-onlyIdempotent

Check WCAG contrast ratios for text elements on a page or DOM snapshot. Get AA/AAA pass/fail results, ratio, and fix delta for failing elements.

Instructions

Compute WCAG contrast ratios for every text element on a rendered page (pass url) or from a supplied dom_snapshot. Reports AA (4.5:1 normal, 3:1 large) and AAA pass/fail and surfaces failing pairs with selector, ratio, and delta-to-pass — replacing manual eyedropper + ratio math. dom_snapshot mode returns a row per supplied element; url mode returns counts plus every row that needs action (aa_failures, indeterminate_bg_rows) and OMITS the per-element rows for passing elements, because a real page produces hundreds of thousands of characters of them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL to render and measure (http/https or file://)
screenshotNoOptional base64 PNG for caller reference; ratios are computed from the DOM, not pixels
dom_snapshotNoPre-collected text elements to score without rendering

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.2.9

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes far beyond these by revealing a genuine non-obvious behavior: url mode OMITS per-element rows for passing elements and explains why (typical page generates hundreds of thousands of characters of them). It also describes the two-mode return shape difference, determinism between input modes, and overload since with manual computing — exactly the behavioral detail an agent needs to set output expectations.

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?

Every clause in the description earns its place — scope, thresholds, failure semantics, mode differentiation, and the rationale for omission are all loaded with concrete facts. The text is dense and readable, though it is a run-on multi-clause paragraph with dashes and commas that could be crisper as separate structured sentences, which costs it a point toward full conciseness.

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 no output schema present, the description still communicates per-mode return shapes, the specific failure row categories (aa_failures, indeterminate_bg_rows), and the omission behavior that affects downstream processing — a near-complete picture for an analysis tool. Minor leftover ambiguities are the aggregation details of 'counts' and how AAA failures are explicitly represented in url mode, so slightly more mandated detail would reach 5.

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 description coverage is 100%, so the baseline is 3 and the schema already documents each parameter. The description adds real semantic value above that by encoding what each option produces, e.g. url mode yields aggregated counts plus only action rows whereas dom_snapshot yields a per-element mapping, and it distinguishes the analytical purpose of the inputs. It stops short of describing format details per parameter, so 4 rather than 5.

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?

The description states a precise verb and resource: 'Compute WCAG contrast ratios for every text element' from a URL or a dom_snapshot, and spells out the concrete output (AA 4.5:1/3:1 and AAA pass/fail, failing pairs with selector, ratio, delta-to-pass). This makes it immediately differentiable from look-alike siblings like audit_contract or suggest_contrast_fix without needing to open any 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 description clearly defines the two invocation routes and what each returns — 'dom_snapshot mode returns a row per supplied element; url mode returns counts plus every row that needs action — so an agent knows which input to use in which situation. It also implies the intended use case ('replacing manual eyedropper + ratio math'), but it does not explicitly state exclusion cases or point to an alternative sibling for other needs, such as suggest_contrast_fix for remedies.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rhinocap/raven-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server