Skip to main content
Glama
Colors MCP Server

Colors MCP Server

by HtetOoWaiYan

Audit CSS colors

colors_audit
Read-onlyIdempotent

Scan CSS for color accessibility problems and return exact findings: text contrast below 4.5:1, border contrast below 3:1, and near-duplicate :root color tokens. Use for stylesheet or design reviews.

Instructions

Scan CSS for color problems and return exact findings: "text-contrast-aa" (color on background below 4.5:1), "nontext-contrast-3" (border-color on background below 3:1) and "near-duplicate-token" (two :root custom-property colors almost identical, ΔE00 under 2). Resolves var(--x) from :root. Use for any stylesheet or design review.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "css": "<css>"
    },
    "name": "colors_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssYesThe CSS text to audit (rules and :root custom properties). Not a file path.

Output Schema

NameRequiredDescriptionDefault
checkedYes
findingsYes
problemsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description then adds genuine behavioral detail the annotations cannot: the finding codes returned, the 4.5:1 and 3:1 contrast ratios, the ΔE00 < 2 near-duplicate threshold, and the fact that var(--x) is resolved from :root. It does not mention limits or how the scan treats unresolvable variables, which keeps it from a 5.

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?

Two dense sentences, front-loaded with the purpose, then findings with thresholds, then the resolution rule, then a usage line. Every clause carries information; nothing is restated from the name or schema verbatim.

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 single-input, read-only audit tool with an output schema and full annotation coverage, this is complete: the agent knows the input form, what is checked, the thresholds, and what categories come back. The remaining details (exact return shape) are handled by the output schema, so no meaningful gap is left.

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% and the single parameter already documents that it is CSS text, not a file path, including length bounds. The description adds only the confirmation that :root custom properties are relevant input and that var() is resolved, which is marginal beyond the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

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 opens with a specific verb+resource ("Scan CSS for color problems") and immediately enumerates the three exact finding categories with their numeric thresholds, so the agent knows precisely what the tool detects rather than just its theme. That enumeration also distinguishes it from generic color utilities in the sibling set, which the description implies without needing to name them.

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?

It states a clear usage context ("Use for any stylesheet or design review") and the input scope (rules and :root custom properties), which is enough to select it confidently. It stops short of naming when-not to use it or pointing at alternatives such as a fix or compare tool, so it falls one step below fully explicit routing.

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