Skip to main content
Glama
lnksoul1

UI Design MCP Server

by lnksoul1

Check Color Contrast (WCAG)

ui_check_color_contrast
Read-onlyIdempotent

Check WCAG 2.1 color contrast ratios between text and background colors, then get pass/fail results for AA and AAA standards with actionable fixes.

Instructions

Check the WCAG 2.1 color contrast ratio between a foreground and background color.

Evaluates against WCAG AA (4.5:1 for normal text, 3:1 for large text) and AAA (7:1 for normal text, 4.5:1 for large text) standards.

Args:

  • foreground (string): Foreground/text hex color (e.g. "#333333")

  • background (string): Background hex color (e.g. "#FFFFFF")

  • response_format (string, optional): 'markdown' or 'json'. Default: 'markdown'

Returns: Contrast ratio, pass/fail for each WCAG level, overall grade, and actionable recommendations.

Examples:

  • Check dark text on white: foreground="#1A1A2E", background="#FFFFFF"

  • Check white text on blue: foreground="#FFFFFF", background="#3B82F6"

  • Check if a muted gray passes: foreground="#888888", background="#FFFFFF"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesBackground hex color (e.g. '#FFFFFF' or 'FFFFFF')
foregroundYesForeground/text hex color (e.g. '#333333' or '333333')
response_formatNoOutput formatmarkdown
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive. The description adds valuable behavioral context: which WCAG levels are checked, the exact ratio thresholds, and what the return includes (ratio, pass/fail, grade, recommendations). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections for purpose, args, returns, and examples. The Args section duplicates schema descriptions somewhat, but the examples earn their place. Overall it's compact and front-loaded, not wasting words.

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

Completeness5/5

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

For a read-only check tool with no output schema, the description fully covers purpose, WCAG standards, parameters, return values, and examples. There are no obvious gaps in what an agent needs to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value with concrete examples (e.g., foreground='#1A1A2E') and clarifies the default response_format. This helps an agent choose valid inputs and understand expected output format.

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?

Description clearly states 'Check the WCAG 2.1 color contrast ratio' – a specific verb and resource. It distinguishes itself from sibling generation tools (ui_generate_*) by being a validation/checking tool. The WCAG level details further clarify scope.

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

Usage Guidelines4/5

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

The description provides clear context: it evaluates against AA/AAA standards and includes examples of use cases (e.g., checking dark text on white). It doesn't explicitly name alternatives or exclusions, but the purpose is distinct enough from siblings that an agent won't confuse it with palette generation or typography tools.

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

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/lnksoul1/prism-ui-design-mcp'

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