Skip to main content
Glama

Gamut membership

gamut
Read-onlyIdempotent

Check whether a CSS color or source-space values fit inside sRGB, Display P3, or Rec. 2020, returning matches or null if outside all.

Instructions

Which standard display gamuts hold a color — sRGB ⊂ Display P3 ⊂ Rec. 2020, each tested in its own RGB box straight from the source space, the same ladder as the color-space.io gamut pill. smallest is the tightest one; null = beyond Rec. 2020. Membership only: nothing is gamut-mapped.

Input Schema

NameRequiredDescriptionDefault
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)'
valuesNoone color in the source space

Output Schema

NameRequiredDescriptionDefault
gamutsYes
smallestYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field 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)"
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description still adds real behavioral context beyond that: the containment ladder sRGB ⊂ Display P3 ⊂ Rec. 2020, that each gamut is tested in its own RGB box taken straight from the source space, and the explicit statement that no gamut mapping is performed.

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 dense sentences with the core assertion ('which gamuts hold a color') front-loaded, followed by the ladder semantics and the membership-only caveat. The color-space.io pill reference is decorative rather than load-bearing, and the unicode subset notation is terse, but nothing is padded.

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?

With an output schema present, the description need not enumerate return fields, and it still explains the semantics of the key return signals (`smallest` as the tightest gamut, null as beyond Rec. 2020). Combined with 100% schema coverage and full annotation coverage, an agent has everything needed to call and interpret this tool.

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% – `from`, `color` and `values` are all documented in the schema, including the fact that `color` is an alternative to `from` + `values`. The description adds no parameter-level detail (no value ranges, no source-space syntax), so the baseline 3 applies.

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 names a specific verb+resource: it reports which standard display gamuts (sRGB, Display P3, Rec. 2020) contain a given color. The closing clause 'Membership only: nothing is gamut-mapped' cleanly separates it from the conversion siblings (convert, css, shader) without requiring the agent to open another schema.

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?

Usage context is clear: this is the membership/containment query, not a mapping or conversion. The 'Membership only' exclusion implicitly steers the agent to a conversion tool when actual gamut mapping is needed, but no sibling is named explicitly, so the alternative 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