Skip to main content
Glama

adjust_color

Read-onlyIdempotent

Adjust any color with lighten, darken, saturate, desaturate, hue-shift, tint, shade, grayscale, invert, or mix operations in perceptual oklch/hct or classic hsl space to avoid muddy mixes and hue drift.

Instructions

Adjust a color using perceptual (oklch, hct) or classic (hsl) math: lighten, darken, saturate, desaturate, hue-shift, tint (mix with white), shade (mix with black), grayscale, invert, or mix with a second color. Perceptual space ('oklch' default) prevents muddy mixes and hue drift.

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>",
      "operation": "<operation>"
    },
    "name": "adjust_color"
  }
}

Input Schema

NameRequiredDescriptionDefault
withNoSecond color (only for mix)
colorYesColor to adjust (hex, CSS name, rgb, hsl, oklch)
spaceNoColor space for adjustment: 'oklch' (default, perceptually uniform), 'hct', or 'hsl'oklch
amountNoAmount of change. Percent (0-100) for lighten/darken/saturate/desaturate/tint/shade, degrees (-360..360) for hue-shift, or 0-1 weight of first color for mix. Default 10 / 30 / 0.5.
operationYesAdjustment operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavioral context: oklch is the default because it prevents muddy mixes and hue drift. It does not mention failure behavior for invalid color strings, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both dense with information: the operation catalog first, the space recommendation second. No filler, and the most decision-relevant content (what operations exist) is front-loaded.

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 5-parameter, fully documented, non-destructive pure function, the description covers purpose, operation semantics, and default-space rationale. The only gap is that it never says what comes back (presumably an adjusted color string), which is a minor omission given there is no output schema.

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 meaning the schema does not: tint and shade are defined as mixes with white and black, mix is described as mixing with a second color, and the default-space rationale explains why 'space' matters. It leaves the 'amount' units to the schema, which already documents them.

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 (adjust) and resource (a color) and then enumerates all ten operations, so an agent can distinguish it from siblings like convert_color, color_distance, or generate_tonal_scale without opening the schema.

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: the sentence clarifies what each operation means (tint = mix with white, shade = mix with black) and recommends perceptual space, but never says when to pick this tool over convert_color or generate_tonal_scale, and offers no exclusions.

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