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.
AI agents call audit_contrast to retrieve information from Raven without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | — | URL to render and measure (http/https or file://) |
screenshot | string | — | Optional base64 PNG for caller reference; ratios are computed from the DOM, not pixels |
dom_snapshot | array | — | Pre-collected text elements to score without rendering |
Parameters from the server's own tool schema.
audit_contrast is a read-only accessibility auditing tool. It accepts input (URL or DOM snapshot) and returns analytical reports on contrast compliance. There are no side effects, state changes, or irreversible operations. This is consistent with the sibling audit_* tools which are all inspection/analysis functions.
From the tool's definition Tool description states it 'computes' and 'reports' WCAG contrast ratios, 'surfaces failing pairs with selector, ratio, and delta-to-pass' — purely informational outputs.
Risk signalsAccepts URL/endpoint input (url) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
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. It is categorised as a Read tool in the Raven MCP Server, which means it retrieves data without modifying state.
audit_contrast accepts 3 parameters: url, screenshot, dom_snapshot. The full parameter table on this page comes from the server's own tool schema.
Register the Raven MCP server in PolicyLayer and add a rule for audit_contrast: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Raven. Nothing to install.
audit_contrast is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the audit_contrast rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for audit_contrast. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
audit_contrast is provided by the Raven MCP server (raven-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →