Skip to main content
Glama

Convert a CSS color

convert_color
Read-onlyIdempotent

Convert a CSS color to hex, rgb() and hsl(), with its relative luminance, its contrast on white and on black, and the better text color (black or white) to put on it. Read-only. Same engine as GET /api/convert.

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": {
      "color": "<color>"
    },
    "name": "convert_color"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorYesColor as a CSS color: "#1a73e8", "#fff", "rgb(26 115 232)", "hsl(217 80% 51%)", "rgba(0,0,0,.6)" or a name like "navy".

Output Schema

NameRequiredDescriptionDefault
hexYes
hslNo
rgbNo
alphaNo
inputNo
versionYes
luminanceYes
bestTextColorYes
contrastOnBlackNo
contrastOnWhiteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/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 description's 'Read-only' statement repeats structured safety data. The description adds some useful context ('Same engine as GET /api/convert') and summarizes outputs, but since an output schema exists, those return details are not strictly necessary for behavioral transparency. No annotations are contradicted.

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?

The description is a single sentence, front-loaded with the core action ('Convert a CSS color to...'), and it avoids unnecessary preamble. It is somewhat long because it enumerates return values that are also covered by the output schema, but it remains readable and wastes little space.

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 one-parameter tool with rich annotations and an output schema, the description provides everything needed to call it correctly: it states the conversion purpose, the expected output categories, and the read-only nature. No essential context for correct invocation is missing.

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?

There is one parameter, and schema description coverage is 100%; the schema itself explains the accepted CSS color formats with examples. The description adds no parameter-specific meaning beyond what the schema already provides, which matches the baseline of 3 when the schema carries the full parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: 'Convert a CSS color to hex, rgb() and hsl()...'. It clearly states what the tool produces, but it does not explicitly differentiate itself from siblings like check_contrast or suggest_accessible_color, so it remains a clear but non-differentiating purpose statement.

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

Usage Guidelines3/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 by describing its conversion output, and it notes 'Read-only' and 'Same engine as GET /api/convert'. However, it gives no explicit guidance about when to choose this tool over alternatives such as check_contrast or check_palette, leaving the comparison implied.

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.

Resources