Skip to main content
Glama

check_color_contrast

Validate color contrast ratios between foreground and background to ensure compliance with WCAG accessibility standards, supporting various color formats and font attributes.

Instructions

Check if a foreground and background color combination meets WCAG contrast requirements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesBackground color in various formats (e.g., "#FFFFFF", "#FFF", "rgb(255,255,255)", "hsv(0,0%,100%)")
fontSizeNoFont size in pixels
foregroundYesForeground color in various formats (e.g., "#000000", "#000", "rgb(0,0,0)", "hsv(0,0%,0%)")
isBoldNoWhether the text is bold
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it states what the tool does (checking WCAG contrast requirements), it doesn't describe what specific WCAG levels are checked (AA/AAA), whether the tool provides detailed failure reasons, what the return format looks like, or any performance characteristics. For a tool with zero annotation coverage, this represents significant gaps in behavioral transparency.

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?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward validation tool and gets directly to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (color contrast validation with 4 parameters) and the absence of both annotations and an output schema, the description is minimally complete. It states what the tool does but doesn't provide information about return values, error conditions, or specific WCAG criteria checked. The description would need to do more heavy lifting to compensate for the lack of structured metadata.

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 description coverage is 100%, so the schema already fully documents all 4 parameters. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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?

The description clearly states the specific action ('Check if...meets WCAG contrast requirements') and identifies the resources involved ('foreground and background color combination'). It distinguishes this tool from sibling tools like 'check_aria_attributes' or 'test_html_string' by focusing specifically on color contrast validation rather than broader accessibility testing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (WCAG compliance checking for color combinations) but doesn't explicitly state when to use this tool versus alternatives like 'test_accessibility' or 'get_rules'. No guidance is provided about when NOT to use this tool or about prerequisites for effective use.

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

Related 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/ronantakizawa/a11ymcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server