Skip to main content
Glama
HalidSaglam

saglitzdesign-mcp

by HalidSaglam

Fix Contrast

fix_contrast
Read-onlyIdempotent

Repair a failing color pair by computing the nearest WCAG 2.2 accessible color, preserving hue and saturation while adjusting lightness to meet the target contrast ratio.

Instructions

Repair a failing color pair: given a foreground and background hex, compute the NEAREST accessible color (hue & saturation preserved, lightness nudged) that meets the WCAG 2.2 target — not just a pass/fail report. Use when audit_accessibility flags a pair and you need the corrected value to ship. For a full pass/fail audit use audit_accessibility; to build a whole palette use generate_color_system.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adjustNoWhich color to move (default 'foreground' — the text)
targetNoTarget contrast ratio (default 4.5 = AA normal text; use 3 for large text/UI, 7 for AAA)
backgroundYesBackground hex it sits on, e.g. '#FFFFFF'
foregroundYesForeground/text hex to adjust, e.g. '#9CA3AF'

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.28.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral context: it returns a corrected value rather than a pass/fail report, preserves hue/saturation, and nudges lightness. It could mention whether the function returns both colors or just the adjusted one, but with strong annotations this is a minor gap.

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?

Three sentences with no wasted words. The core operation and key constraint are front-loaded, and the sibling routing is compact at the end. Every clause earns its place.

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

Completeness4/5

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

For a 4-param tool with 100% schema coverage, no output schema, and strong annotations, the description is nearly complete. It explains the algorithm, the scope, and the alternatives. The only missing context is exactly what the return value looks like (single hex? pair? object?), but since no output schema exists, that information would have been valuable. Still, the tool is simple enough that the gap is small.

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 documents all four parameters. The description adds useful context by explaining the default behavior ('foreground' as the text, target default 4.5, and the meaning of different targets), but it doesn't deeply elaborate on parameter formats beyond what the schema provides. A 3 is appropriate because the schema carries the heavy lifting and the description adds modest interpretive 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 states a specific verb ('Repair'), a precise resource (color pair contrast), and the algorithm's intent (nearest accessible color, hue/saturation preserved, lightness nudged). It explicitly distinguishes itself from audit_accessibility and generate_color_system, so an agent can separate it from siblings without inspecting their schemas.

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

Usage Guidelines5/5

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

It gives explicit when-to-use ('when audit_accessibility flags a pair') and when-not-to-use ('For a full pass/fail audit use audit_accessibility; to build a whole palette use generate_color_system'), naming the alternatives directly. No inference is required.

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

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/HalidSaglam/saglitzdesign-mcp'

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