Skip to main content
Glama

Dark mode palette

dark_mode_palette
Read-only

Derive a dark counterpart from light-mode tokens. Pass tokens as name: color lines (CSS custom properties work), a JSON object of name to color, or an array of {name, color}. Roles are guessed from the name (surface, raised surface, text, border, accent, on-accent) and then from the color. Surfaces are rebuilt around OKLCH L 0.19 with raised layers stepped lighter; text is mapped to light values under pure white; borders keep their distance from the surface; accents keep hue, gain lightness and lose about 15 percent chroma. Text and accents are nudged until they reach 4.5:1 on the lightest dark surface. Returns the mapping per token with a note, any pairs that still fail with their ratios, and CSS variables. The lifted-surface approach is a convention, not a standard.

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": "dark_mode_palette"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokensYesLight tokens: "bg: #fff\ntext: #111\nprimary: #2563eb", a JSON object, or an array of {name, color}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

With readOnly and destructive annotations already covering safety, the description adds substantial beyond-schema behavior: role inference, OKLCH surface construction, accent/text adjustments, 4.5:1 nudging, failure reporting, and a caveat that lifted surfaces are a convention. Nothing contradicts the annotations.

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?

Front-loaded with purpose, then input formats, then the algorithm, then return shape and caveat. Although detailed, every sentence carries technical information needed to predict the transformation, so it is appropriately sized for a complex generator.

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

Completeness5/5

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

There is no output schema, so the description must explain what comes back; it does—per-token mapping with notes, failing pairs with ratios, and CSS variables. Combined with annotations and the fully documented input schema, it is complete enough to invoke correctly.

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% and already documents the single tokens parameter, but the description adds useful interpretation details: CSS custom properties work, accepted line/JSON/array forms, and that roles are guessed from name then color. It could go further in clarifying how the JSON-object form relates to the schema's actual anyOf.

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?

Starts with a specific verb and resource—'Derive a dark counterpart from light-mode tokens'—and immediately specifies token input formats and transformation scope. This makes it distinct from sibling audit/check tools such as check_colour_mode or check_email_dark_mode, even without naming them.

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 opening sentence implies when to use it (converting light tokens into a dark palette), and the input-format sentence clarifies invocation. But there is no explicit 'use this instead of X' or when-not-to-use guidance, so an agent must infer context among many siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources