Skip to main content
Glama

check_contrast

Check WCAG 2.1 contrast ratio between foreground and background colors. Returns ratio and AA/AAA pass/fail for both normal and large text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesBackground hex color
foregroundYesForeground hex color

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden. It goes beyond a simple 'check contrast' by disclosing that it returns a ratio and AA/AAA pass/fail for both normal and large text, giving useful insight into output behavior without being verbose.

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 two sentences with zero filler. The first sentence front-loads the core purpose, and the second sentence succinctly explains the return value. Every word earns its place.

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 simple two-parameter tool, the description fully covers the purpose, input semantics (via schema), and output behavior. No output schema exists, but the description explains what the return includes. There are no gaps considering the tool's low complexity.

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 coverage is 100%, with both parameters described as hex colors. The description merely restates 'foreground' and 'background' without adding extra semantics (e.g., format requirements or defaults). The schema already carries the parameter meaning, so the description adds no additional value.

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 uses a specific verb 'Check' with a resource 'WCAG 2.1 contrast ratio' and explicitly names the two inputs. This clearly distinguishes it from sibling tools like color_harmony or convert_color, which deal with color generation/conversion rather than accessibility checking.

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 implies when to use the tool: when you need to verify color contrast compliance. It provides clear context on the purpose but does not explicitly exclude alternative uses or name alternatives. Since sibling tools are topically distinct, this is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: contrast checking, palette generation from a base color, random palette generation, color format conversion, and CSS/Tailwind output generation. While color_harmony and random_palette both generate harmonious colors, their inputs differ (base color vs. random), making the distinction unambiguous.

Naming Consistency3/5

Tool names mix conventions: some use a verb_noun pattern (check_contrast, convert_color, generate_css, generate_gradient, generate_tailwind) while others use noun_phrase (color_harmony, random_palette). The 'generate' prefix is applied inconsistently, as color_harmony and random_palette also generate outputs but don't follow the pattern. However, names are still readable and descriptive.

Tool Count5/5

Seven tools is well within the optimal range for a color utility server. Each tool serves a distinct function and together they cover the core color operations without unnecessary bloat.

Completeness5/5

The tool set covers the full workflow: generating palettes (color_harmony, random_palette), converting colors (convert_color), checking accessibility (check_contrast), and generating design-system outputs (generate_css, generate_tailwind, generate_gradient). There are no obvious dead ends; a user can generate a palette, examine its colors, and export it to different formats.