Skip to main content
Glama

audit_contrast

Read-only

Compute WCAG contrast ratios for every text element on a page, reporting AA and AAA pass/fail with selector, ratio, and delta-to-pass. Replaces manual eyedropper and ratio math.

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 per element and surfaces failing pairs with selector, ratio, and delta-to-pass — replacing manual eyedropper + ratio math.

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
Behavior4/5

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

Annotations indicate read-only, non-destructive, and open-world. Description adds behavioral details: what the tool reports (selector, ratio, delta-to-pass) and that screenshot is for reference only. No contradiction.

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?

Single, well-structured sentence front-loads the main action and packs output details efficiently. No extraneous text.

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?

Handles both input modes and describes output format (AA/AAA pass/fail, failing pairs) despite no output schema. Complete for a targeted audit tool.

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 covers 100% of parameters with descriptions. The tool description reinforces the two modes but does not add significant new meaning beyond schema. Baseline 3 is appropriate.

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?

Clearly states it computes WCAG contrast ratios for text elements from a URL or dom_snapshot, reporting AA/AAA pass/fail and failing pairs. Distinguishes from sibling tools like audit_contract or audit_api_contract that address other aspects.

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?

Explicitly describes two input modes (url or dom_snapshot) and mentions replacing manual computation. Provides context but no explicit when-not-to-use or alternatives beyond contrast fixing.

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