Skip to main content
Glama
mapbox

Mapbox Developer MCP Server

Official
by mapbox

Check Color Contrast Tool

check_color_contrast_tool
Read-onlyIdempotent

Verify foreground and background color contrast meets WCAG 2.1 AA or AAA standards using any CSS color format.

Instructions

Checks color contrast ratios between foreground and background colors for WCAG 2.1 accessibility compliance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoWCAG conformance level to check against (default: AA)
fontSizeNoFont size category: normal (<18pt or <14pt bold) or large (≥18pt or ≥14pt bold)
backgroundColorYesBackground color in any CSS format (hex, rgb, rgba, named colors)
foregroundColorYesForeground color (text color) in any CSS format (hex, rgb, rgba, named colors)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelYesWCAG level checked (AA or AAA)
passesYesWhether the contrast ratio meets the specified WCAG level
fontSizeYesFont size category (normal or large)
contrastRatioYesCalculated contrast ratio between foreground and background
minimumRequiredYesMinimum contrast ratio required for the specified level and font size
recommendationsNoOptional recommendations for improvement
wcagRequirementsYesComplete WCAG contrast requirements for all levels
Behavior3/5

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

Annotations already indicate the tool is read-only, idempotent, and non-destructive. The description adds the WCAG compliance context but no further behavioral details (e.g., no mention of input validation, limits). A baseline score is appropriate.

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?

Single, well-structured sentence that front-loads the core purpose. No unnecessary 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?

Given the tool's simplicity, the presence of an output schema, and comprehensive annotations, the description is complete. It covers the essential purpose without needing more detail.

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?

Input schema has 100% description coverage for all 4 parameters, including enums and format details. The description adds no additional parameter semantics beyond what the schema provides, so baseline score is correct.

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 tool checks color contrast ratios for WCAG 2.1 accessibility compliance, with a specific verb ('checks'), resource ('color contrast ratios'), and purpose, distinguishing it from sibling tools like validate_style_tool or preview_style_tool.

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 implicitly indicates when to use the tool (for WCAG compliance), but does not explicitly state when not to use it or mention alternatives. Given the sibling context, the purpose is clear enough.

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/mapbox/mcp-devkit-server'

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