Skip to main content
Glama

generate_state_colors

Read-onlyIdempotent

Generate consistent hover, active, pressed, focus, disabled, and selected colors from a base color. Steps are computed in HCT space so each state keeps equal perceptual weight across any hue.

Instructions

Generate consistent interaction-state colors (hover / active / pressed / focus / disabled / selected) from a base color. Steps are computed in HCT space so they keep equal perceptual weight regardless of base hue.

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": {
      "base": "<base>"
    },
    "name": "generate_state_colors"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYesBase/resting color (hex, rgb, hsl)
isDarkNoWhether the base color sits on a dark background. Hover lightens on dark, darkens on light.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.8/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), so the description is free to add real behavioral context: the computation happens in HCT space and steps retain equal perceptual weight regardless of hue. That is a genuine non-obvious trait beyond the annotations. It does not say how many values come back or how edge cases (e.g., mid-lightness bases) behave.

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 tightly written sentences, front-loaded with what is produced before the implementation note. Nothing is redundant and nothing could be cut without losing information.

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 two-parameter, non-destructive read tool with full schema coverage, the description supplies the output constituents and the color-space rationale. Without an output schema, one more clause on return shape (a state-to-color mapping) would close the remaining gap.

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%, so both `base` and `isDark` are already fully documented, including the lighten-on-dark/darken-on-light rule. The description adds no parameter-level meaning beyond the schema; baseline 3 applies.

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?

Uses a specific verb ("Generate") with a precisely scoped resource (interaction-state colors) and enumerates the six states produced, so an agent can immediately tell this is not a general palette or tonal-scale tool. It stops short of naming any sibling, so it never explicitly rules an alternative in or out.

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 only implied: the enumerated state names signal when to reach for it (UI state tokens), but there is no stated "use this instead of generate_tonal_scale" routing or any when-not condition. The agent must infer the boundary from the purpose statement alone.

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