Skip to main content
Glama

generate_gradient

Read-onlyIdempotent

Create color gradients between two or more colors with selectable interpolation spaces, easing, and hex, CSS, or array output.

Instructions

Generate a smooth gradient between colors with multiple interpolation methods (oklch, oklab, lab, lch, hct, hsl, rgb)

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>",
      "steps": "<steps>"
    },
    "name": "generate_gradient"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYesTotal number of colors in the gradient, including every input color (must be ≥ number of colors)
colorsYesColors to create gradient between (2-32)
easingNoEasing function for gradient transitionlinear
formatNoOutput format for the gradientarray
interpolationNoColor space for interpolation (oklch/oklab/lab/lch/hct are perceptually smooth)lab

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnly, idempotent and non-destructive behavior, so safety is covered. The description adds only an enumeration of interpolation methods, which is already in the schema enum, and says nothing about the returned value shape (string vs array vs CSS text) or how the steps/colors interaction errors are handled.

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?

A single front-loaded sentence with no filler, though the parenthetical list of color spaces duplicates schema content and consumes most of the sentence's length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only generator this is roughly adequate, the schema is fully documented and no output schema exists. However, nothing explains the actual return value despite a format parameter that yields hex, CSS linear, CSS radial, or array output, leaving an agent uncertain what comes back.

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 every parameter carries a description, so the baseline is 3. The description merely restates the interpolation enum and adds no semantics for steps, easing, format, or the constraint that steps must be at least the number of colors.

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 ('Generate a smooth gradient between colors') plus the interpolation-space dimension, which is enough for an agent to know this produces a multi-step gradient rather than a discrete palette. It does not differentiate itself from siblings like generate_palette or generate_tonal_scale, 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?

No guidance on when to choose this over generate_palette, generate_tonal_scale, or generate_categorical_palette, and no prerequisites or exclusions given. Usage is only implied by the tool name and the word 'gradient'.

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