Skip to main content
Glama

Palette Light and Dark Mode Maps

palette_light_dark
Read-only

Generate light-mode and dark-mode role maps from a palette. Analyses LRV, assigns background/surface/text/accent roles for each mode, checks body text contrast safety, and flags missing neutrals. The result already carries the rendered palette and its PNG, PDF, ASE, JSON and CSS downloads, ready to show the customer. The archive anchors a colour was derived from are evidence, not the recommended colours. A final palette chosen from this evidence is registered with palette_finalize, called once with those exact colours, so the customer can see and download what was actually recommended.

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": {
      "palette": "<palette>"
    },
    "name": "palette_light_dark"
  }
}

Input Schema

NameRequiredDescriptionDefault
paletteYesArray of hex values
use_caseNoUse case context e.g. UI, dashboard, reportUI

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Structured JSON response. Shape varies by tool; most return an 'ok' boolean plus a 'result' or 'results' field with the tool's data payload.",
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "error": {
      -      "type": "string"
      -    },
      -    "ok": {
      -      "type": "boolean"
      -    },
      -    "result": {
      -      "type": [
      -        "object",
      -        "array",
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true already covers the safety profile, and the description adds meaningful behaviour beyond it: it performs contrast-safety checking, flags missing neutrals, and returns rendered downloads in PNG, PDF, ASE, JSON and CSS. It also draws a non-obvious semantic line — archive anchors are evidence, not recommendations — which prevents misuse. No mention of cost, limits, or failure modes for an invalid palette, keeping it short of a 5.

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?

Purpose is front-loaded and the evidence-versus-recommendation distinction is well placed at the end. However, the final sentence is overlong and circular ("so the customer can see and download what was actually recommended"), and the output-format list partially duplicates what the output schema and result already convey.

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?

An output schema exists, yet the definition still usefully signals what comes back (rendered palette plus PNG/PDF/ASE/JSON/CSS artifacts) and how this step hands off to palette_finalize. For a two-parameter read-only generator, an agent has enough to call it and act on the result; only the use_case behaviour and palette validity constraints are unaddressed.

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% for both parameters, so the baseline applies. The description implies the palette input drives role assignment but says nothing extra about the hex format, array size expectations, or how use_case (UI, dashboard, report) changes the role mapping — the one parameter where added meaning would genuinely help.

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?

Opens with a specific verb+resource: "Generate light-mode and dark-mode role maps from a palette," then enumerates the concrete sub-tasks (LRV analysis, role assignment, body-text contrast check, missing-neutral flags). It also names the downstream sibling palette_finalize, so an agent can place it in the workflow without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear operating context: this tool produces *evidence* (the anchors a colour was derived from), and the recommended palette is registered separately via palette_finalize called once with the exact chosen colours. That is real when/how guidance, but it offers no explicit exclusion against the many look-alike siblings (palette_analyse, palette_specify, palette_compare), leaving the boundary to inference.

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