suggest_contrast_fix

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

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

What suggest_contrast_fix does on Raven

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.

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

Why suggest_contrast_fix needs a policy

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.

Questions about suggest_contrast_fix

What does the suggest_contrast_fix tool do? +

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.

What parameters does suggest_contrast_fix accept? +

suggest_contrast_fix accepts 2 parameters: level, pairs. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on suggest_contrast_fix? +

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.

What risk level is suggest_contrast_fix? +

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

Can I rate-limit suggest_contrast_fix? +

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.

How do I block suggest_contrast_fix completely? +

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.

What MCP server provides suggest_contrast_fix? +

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.

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