Given failing WCAG color pairs, return the MINIMAL color change that clears the target ratio. For each {fg,bg} pair, computes the smallest foreground adjustment (and an alternative background adjustment) that reaches AA/AAA — with the achieved ratio and direction. Feeds directly from audit_contra...
AI agents call suggest_contrast_fix 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 |
|---|---|---|---|
level | string | — | WCAG level when targetRatio is not given per-pair. Default AA. |
pairs | array | — | Color pairs to remediate. Each: { selector?, fg, bg, fontPx?, bold?, targetRatio? }. fontPx/bold pick the large-text threshold; targetRatio overrides the level. |
Parameters from the server's own tool schema.
suggest_contrast_fix is a pure computational utility that analyzes color contrast ratios and suggests fixes. It performs no writes, destructive operations, or external side effects. The suggestion output could be applied by users, but the tool itself only reads input values and performs mathematical analysis, classifying it as a Read operation with low severity risk.
From the tool's definition Tool description emphasizes 'return', 'computes', and 'Pure offline math' — indicating it performs calculations and provides recommendations without modifying any data, design tokens, or assets.
Attacks that exploit this kind of access
Given failing WCAG color pairs, return the MINIMAL color change that clears the target ratio. For each {fg,bg} pair, computes the smallest foreground adjustment (and an alternative background adjustment) that reaches AA/AAA — with the achieved ratio and direction. Feeds directly from audit_contrast's failing pairs: pass them here to get concrete passing values instead of brute-forcing colors by hand. Pure offline math. It is categorised as a Read tool in the Raven MCP Server, which means it retrieves data without modifying state.
suggest_contrast_fix accepts 2 parameters: level, pairs. 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 suggest_contrast_fix: 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.
suggest_contrast_fix 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 suggest_contrast_fix 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 suggest_contrast_fix. 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.
suggest_contrast_fix 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 →