audit_contrast

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.

Server Raven raven-mcp
Category Read
Risk class Low
Parameters 30 required

What audit_contrast does on Raven

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.

ParameterTypeRequiredDescription
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.

Why audit_contrast needs a policy

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

Questions about audit_contrast

What does the audit_contrast tool do? +

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.

What parameters does audit_contrast accept? +

audit_contrast accepts 3 parameters: url, screenshot, dom_snapshot. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on audit_contrast? +

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.

What risk level is audit_contrast? +

audit_contrast is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit audit_contrast? +

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.

How do I block audit_contrast completely? +

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.

What MCP server provides audit_contrast? +

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.

// LOOK UP ANOTHER 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 →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.