Skip to main content
Glama

convert_color

Read-onlyIdempotent

Converts a color to a target format such as hex, RGB, HSL, LAB, HCT, OKLAB, or OKLCH, accepting hex, CSS names, or functional color strings.

Instructions

Convert colors between formats (hex, rgb, hsl, lab, hct, oklab, oklch). Accepts hex, CSS named colors, rgb(), hsl(), oklch(), oklab(), or hct().

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

Input Schema

NameRequiredDescriptionDefault
toYesTarget format
colorYesColor to convert (hex, CSS name, rgb(), hsl(), oklch(), oklab(), or hct())

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety and determinism profile is fully covered. The description adds only the accepted input syntax, which is useful but not behavioral context such as rounding of out-of-gamut results or precision of output values. Adequate against the annotation baseline, no more.

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?

Two tight sentences with the core purpose front-loaded and no filler. The second sentence partially duplicates the first's format list, which is mild redundancy but not harmful.

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 simple two-parameter pure conversion function with full annotation coverage and full schema coverage, the description supplies enough to call it correctly. No output schema exists, so the omission of return-value detail (e.g., output string format) is a small remaining gap.

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% and the target-format enum is documented in the schema, so the schema carries the parameter burden. The description's list of accepted input formats largely restates the schema's 'color' field description rather than adding new meaning. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Convert colors between formats') and enumerates the supported formats, so an agent knows exactly what the tool does. It does not distinguish itself from siblings like adjust_color or describe_color, which also take color inputs, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no mention of alternatives. An agent must infer from the name alone that this is for format transformation rather than adjustment or inspection, and nothing in the description rules out misuse for those adjacent tasks.

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