Skip to main content
Glama

Generate Button States

generate_component_states

Generate accessible button CSS from one brand color, covering default, hover, active, focus-visible, and disabled states for primary, secondary, ghost, and danger variants with contrast checks.

Instructions

Generate complete, accessible button CSS from one brand color: default, hover, active, focus-visible and disabled for primary, secondary, ghost and danger variants, with every state's contrast verified. Deterministic, no API key needed.

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": {
      "brand": "<brand>"
    },
    "name": "generate_component_states"
  }
}

Input Schema

NameRequiredDescriptionDefault
brandYesBrand color as hex
variantsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that every state's contrast is verified, that output is deterministic, and that no credentials are required. It stops short of saying exactly what the return value looks like (CSS text vs. tokens vs. file) or whether existing styles are affected.

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?

A single dense sentence with the scope, states, variants, contrast verification and determinism guarantee front-loaded; no filler and no repetition of the tool name.

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 2-parameter generator with no output schema and no annotations, the description covers scope, accessibility behavior and determinism adequately. The remaining gap is output shape, which the agent must infer, but nothing critical to invoking it is missing.

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 coverage is 50%: brand is documented as hex in the schema, while variants carries an enum and default but no prose. The description restates the four variant values but adds no new meaning such as whether omitting variants yields all of them or how an invalid/duplicate entry behaves.

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?

States a specific verb (generate) and resource (button CSS), scoped to a single brand color, enumerating covered states (default, hover, active, focus-visible, disabled) and variants (primary, secondary, ghost, danger). An agent can distinguish it from generate_form_styles or generate_palette 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?

The 'from one brand color' framing tells the agent the input prerequisite and the 'no API key needed' note sets expectations, but there is no explicit when-to-use/when-not or named alternative among the many generate_* siblings. Guidance is implied rather than stated.

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