Skip to main content
Glama

Check a Candor brand file

theme_check
Read-onlyIdempotent

Check a brand file (candor-brand.css, or any CSS that sets Candor's tokens) the way npx candor-ui theme check does: colour contrast of every text and edge pairing in light, dark and high contrast, each with its ratio and the ratio it needs; then the --cd-motion-* and --cd-sound-* values against the motion manifest; then token names and data-slot selectors against the token manifest, as warnings that don't fail the check (a --cd-* name the kit doesn't read, with the nearest one it does; a value outside a token's range; an internal --cd-* name a brand file shouldn't set; a [data-slot] selector no component renders). Call it with the file's contents after you edit candor-brand.css, and fix what it reports before you say the theme is done. Returns a short summary (failures first, with a suggested lightness that would pass; findings with file, line and the fix), then the findings as JSON (ok, motionChecked, counts, themes with every pairing, suggestions, motionAndSound.findings, tokens.findings). Anything it can't read (a color-mix(), a var(), a sound file) is reported as not measured, never as a pass. Sound files are not measured here: the server can't see your public/ folder, so npx candor-ui theme check in the project does that. It checks against the current kit; an older @candor-kit in the file is checked against the current names, with a note. It reads only the CSS you send, follows no @import and fetches nothing. At most 256 KB. Example arguments: { "css": ":root { --primary: oklch(0.55 0.2 260); --cd-motion-pop-dur: 140ms; }", "filename": "candor-brand.css" }

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": {
      "css": "<css>"
    },
    "name": "theme_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssYesThe CSS to check: the whole text of candor-brand.css (at most 256 KB).
filenameNoWhat to call it in findings (default candor-brand.css).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent/closed-world annotations: it discloses that it reads only the CSS sent, follows no @import, fetches nothing, caps at 256 KB, checks against the current kit and notes stale @candor-kit pins, and that unreadable inputs (color-mix(), var(), sound files) are reported as not measured rather than passing. It also enumerates the return shape even though no output schema exists.

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?

Front-loaded with the core action and result usage, and nearly every clause carries non-redundant information (severity semantics of warnings, the not-measured rule, the size limit, the CLI fallback). It is a single dense run-on paragraph with nested parentheticals, which makes it harder to scan than a short bulleted structure would be.

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?

For a two-parameter validator with no output schema, the definition covers everything an agent needs: what is checked, what is warned versus failed, what cannot be measured and why, the resource limits, and the exact shape of the returned summary plus JSON keys. No material gap remains.

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% for both parameters, so the baseline is 3; the description adds a worked example showing that css is the full file text (not a path) and that filename is a display label, which clarifies the most likely misuse (passing a path instead of contents). Minor overlap with the schema's own 256 KB maxLength keeps it from a 5.

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 and resource ('check a brand file ... candor-brand.css') and enumerates the three check families it performs: colour contrast pairings across light/dark/high-contrast, motion and sound values, and token names / data-slot selectors. An agent can tell immediately this is a validator for theme CSS, distinct from the doc-lookup siblings.

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

Usage Guidelines5/5

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

Gives explicit trigger ('call it with the file's contents after you edit candor-brand.css'), explicit follow-up ('fix what it reports before you say the theme is done'), and routes the uncovered case elsewhere ('sound files are not measured here: ... `npx candor-ui theme check` in the project does that'). When-to-use, when-not-to-use and the alternative are all present.

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.