Skip to main content
Glama

Generate Dark Theme

generate_dark_theme

Convert light design tokens JSON into a dark theme for data-theme and prefers-color-scheme, then recheck and fix text and accent contrast against the new background.

Instructions

Turn a light design's tokens JSON into a dark theme (data-theme and prefers-color-scheme), re-checking text and accent contrast against the new background and fixing failures. 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": {
      "tokens": "<tokens>"
    },
    "name": "generate_dark_theme"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokensYesTokens JSON with a `colors` object (from extract_tokens or your own)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/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 load and does well: it discloses the two output forms (data-theme attribute and prefers-color-scheme media query), that contrast for text and accents is re-checked against the new background and failures are auto-fixed, and that behavior is deterministic with no API key required. It does not say whether the input is mutated, what the return payload looks like, or what happens if contrast cannot be repaired.

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 tight sentences with zero filler. The transformation and its output forms come first, the contrast-repair behavior second, and the operational constraints (deterministic, no key) last, so the most important information 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 one-parameter generator with no annotations and no output schema, the description covers input expectations, output artifacts, side behavior (contrast fixing), and operational constraints. The remaining gap is the shape of the response itself, which is not described anywhere since no output schema exists.

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?

The single parameter is fully documented in the schema, so the baseline would be 3, but the description adds a real constraint the schema does not state: the tokens must represent a light design, and the parameter is referenced as coming from extract_tokens or user-authored JSON. That meaningfully shapes what an agent should pass.

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: converts a light design's tokens JSON into a dark theme with data-theme and prefers-color-scheme outputs. That is far more precise than the surrounding generate_* siblings, but it never names a differentiating alternative (e.g. convert_tokens or generate_palette), so the agent must infer the boundary from the verb alone.

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 phrase 'Turn a light design's tokens JSON' implies the precondition (you have light-mode tokens) and the goal (you need a dark theme), which is usable context. However, there is no explicit when-to-use vs when-not guidance and no pointer to alternatives such as convert_tokens or generate_design_system for related work.

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