Skip to main content
Glama
Colors MCP Server

Colors MCP Server

by HtetOoWaiYan

Adjust colors

colors_adjust
Read-onlyIdempotent

Adjust CSS colors' lightness, chroma, or hue by exact OKLCH amounts, returning valid sRGB hex values and lowering chroma automatically when a color leaves the gamut.

Instructions

Make colors lighter, darker, more or less colorful, or rotate the hue, by exact OKLCH amounts. Changes only the property you name; the result is always a valid sRGB hex (chroma is lowered if the color would leave the gamut). Examples: {property:"lightness",mode:"add",amount:-0.1}; {property:"hue",mode:"add",amount:40}; {property:"chroma",mode:"multiply",amount:0.6}.

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": {
      "colors": "<colors>",
      "property": "<property>",
      "amount": "<amount>"
    },
    "name": "colors_adjust"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo"add" the amount (negative lowers it), "multiply" by the amount (0.5 halves chroma), or "set" the property to the amount. Default "add".add
amountYesThe number to add, multiply by, or set. Lightness and chroma are on the OKLCH scale (add -0.1 lightness = a bit darker); hue is in degrees.
colorsYesColors to adjust. A list, even for a single color. Any CSS color strings.
propertyYesWhat to change, in OKLCH: lightness (0 black to 1 white), chroma (colorfulness, about 0 to 0.4), or hue (degrees, 0 to 360).

Output Schema

NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv2.1.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / amount / description
      Previous value: -"Amount to adjust by (e.g., 0.1 for +10%, -0.05 for -5%)"New value: +"The number to add, multiply by, or set. Lightness and chroma are on the OKLCH scale (add -0.1 lightness = a bit darker); hue is in degrees."
    • removedInput schema / properties / color
      Removed value: -{
      -  "description": "Color string in any supported format (e.g., \"#ff0000\", \"red\", \"rgb(255, 0, 0)\", \"oklch(0.6 0.2 29)\")",
      -  "minLength": 1,
      -  "type": "string"
      -}
    • addedInput schema / properties / colors
      Added value: +{
      +  "description": "Colors to adjust. A list, even for a single color. Any CSS color strings.",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 50,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / mode / default
      Added value: +"add"
    • changedInput schema / properties / mode / description
      Previous value: -"Property to adjust (lightness, chroma, hue)"New value: +"\"add\" the amount (negative lowers it), \"multiply\" by the amount (0.5 halves chroma), or \"set\" the property to the amount. Default \"add\"."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "lightness",
      -  "chroma",
      -  "hue"
      -]New value: +[
      +  "add",
      +  "multiply",
      +  "set"
      +]
    • addedInput schema / properties / property
      Added value: +{
      +  "description": "What to change, in OKLCH: lightness (0 black to 1 white), chroma (colorfulness, about 0 to 0.4), or hue (degrees, 0 to 360).",
      +  "enum": [
      +    "lightness",
      +    "chroma",
      +    "hue"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / relative
      Removed value: -{
      -  "default": false,
      -  "description": "Whether to adjust relatively (%) or absolutely",
      -  "type": "boolean"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "color",
      -  "mode",
      -  "amount"
      -]New value: +[
      +  "colors",
      +  "property",
      +  "amount"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "results": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "gamutMapped": {
      +            "type": "boolean"
      +          },
      +          "input": {
      +            "type": "string"
      +          },
      +          "output": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "input",
      +          "output",
      +          "gamutMapped"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond that: only the named property is mutated, and gamut overflow is handled by lowering chroma so the output is always a valid sRGB hex. That gamut-clamping disclosure is exactly the kind of side effect an agent could not infer from annotations or schema.

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 capability statement and the scope caveat come first, and the examples are grouped at the end where a reader can skim or skip them. The example triple is mildly redundant with the already-rich schema enums, but it is compact and earns its place as invocation guidance.

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 needn't explain return shape, and annotations cover safety. Given four flat parameters and a maximum of 50 colors, the description supplies everything else the agent needs: what changes, the OKLCH units, the gamut fallback, and call-shape examples.

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 description coverage is 100%, so the schema alone would justify a baseline 3 — mode, amount, property, and colors are all documented with enums and scale notes. The description earns above baseline by showing the three parameters composed in realistic calls, which clarifies the add/multiply/set interaction with negative and fractional amounts more concretely than the enum prose does.

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 opens with a specific verb and resource ("Make colors lighter, darker, more or less colorful, or rotate the hue") and pins down the substrate ("exact OKLCH amounts"). The clause "Changes only the property you name" implicitly separates it from siblings like colors_blend or colors_fix, but no sibling is named outright, so the differentiation is inferential rather than explicit.

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?

Concrete worked examples ({property:"lightness",mode:"add",amount:-0.1} and two others) show the agent exactly how to shape a call, which is strong positive guidance. What's absent is any exclusion guidance — nothing says when to reach for colors_fix, colors_blend, or colors_harmony instead of adjusting a single property directly.

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