Skip to main content
Glama

Library code

code
Read-onlyIdempotent

Generate paste-ready color conversion snippets for JavaScript and Python, with verified results and caveats for each source-to-target space pair.

Instructions

The conversion as code to paste: the color-space JS call with its result and – where one exists for the space on the non-sRGB side – the colour-science (Python) equivalent verified against color-space (sRGB ↔ that space), with any named caveat. The color goes in as a CSS string or as values in from (default: sRGB 200, 100, 50).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYestarget space id, e.g. 'rgb', 'oklch', 'lab', 'slog3', 'rec709' (the 'spaces' tool lists all 221)
fromNosource space id, e.g. 'rgb', 'oklch', 'lab', 'slog3', 'rec709' (the 'spaces' tool lists all 221)
colorNoa CSS color instead of `from` + `values`: '#ff8000', 'rebeccapurple', 'oklch(0.7 0.1 50)', 'lab(54% 80 67)', 'color(display-p3 1 0.5 0)'
valuesNothe color in the source space

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsYes
pythonYes
pythonForYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.5.0
    • changedInput schema / properties / from / description
      Previous value: -"source space id, e.g. 'rgb', 'oklch', 'lab', 'slog3', 'rec709' (the 'spaces' tool lists all 205)"New value: +"source space id, e.g. 'rgb', 'oklch', 'lab', 'slog3', 'rec709' (the 'spaces' tool lists all 221)"
    • changedInput schema / properties / to / description
      Previous value: -"target space id, e.g. 'rgb', 'oklch', 'lab', 'slog3', 'rec709' (the 'spaces' tool lists all 205)"New value: +"target space id, e.g. 'rgb', 'oklch', 'lab', 'slog3', 'rec709' (the 'spaces' tool lists all 221)"
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds real behavioral context: the output is a JS call with result plus a verified Python equivalent and a named caveat, and that the Python form only exists on the non-sRGB side. This goes beyond the annotations usefully, though it does not mention caveats around missing equivalents or error handling.

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 sentences, front-loaded with what the tool returns. The first sentence is dense and hyphen-heavy, but no sentence is wasted and the key output contract comes first.

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?

With an output schema present and 100% schema coverage, the description only needs to frame what is returned, which it does by naming the JS call, result, Python equivalent and caveat. Minor gaps in when-to-use and default-value syntax keep it short of a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds information not in the schema: the default color is sRGB 200, 100, 50 and that input arrives either as a CSS string or as values tied to `from`. That default detail is genuinely additive over the schema's per-parameter text.

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 specifies what the tool produces: a pasteable conversion expressed as a color-space JS call with its result plus the Python colour-science equivalent and any caveat. This distinguishes it from the value-only `convert` sibling implicitly by emphasizing 'code to paste', though it never names `convert` directly.

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?

Usage is implied rather than stated: an agent infers you call this when you want reusable code rather than a converted value. There is no explicit when-to-use/when-not guidance or reference to `convert`/`css` as alternatives, so the routing decision is left to inference.

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

Deploy Server

Other Tools