Skip to main content
Glama

validate_theme

Validate any compiled theme CSS against a token contract and WCAG contrast audit to identify missing tokens and accessibility warnings.

Instructions

Validate ANY theme CSS against cia's real token contract and WCAG contrast audit — the same check npm run validate-themes runs, exposed as a tool call. Not scoped to cia's own themes: works on a fully custom theme you (or another agent) just built, e.g. via the derive-theme assemble_prompt intent. Pass compiled CSS (a :root or [data-theme="..."] block) — this does not compile Sass, so give it the output, not .scss source. Returns missing required tokens (if any, mode "per-file" or "consolidated" depending on shape) and a11y warnings per contrast pair.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssYesCompiled theme CSS to validate — the :root/[data-theme] block(s), not .scss source.
labelNoOptional name for the result (e.g. the intended theme name); purely cosmetic.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations, so the description carries the full burden and mostly succeeds: it discloses that it does not compile Sass, what it checks (required tokens + contrast pairs), and what it returns (missing tokens with mode 'per-file' vs 'consolidated', a11y warnings per pair). It does not state whether validation is read-only/pure or whether errors throw vs return, but the return-shape detail is unusually rich for an unannotated validator.

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?

Three dense sentences, front-loaded with the core verb+scope, then the custom-theme applicability, then input format and return shape. Efficient, though the parenthetical about mode shapes is slightly heavy for a description.

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-param validator with no output schema and no annotations, the description covers scope, non-applicability (Sass), expected input shape, and return content. It is complete enough to call correctly; only the error/throw behavior is unspecified.

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 100% and both parameters are already documented in the schema (including the 'not .scss source' hint on css and the cosmetic nature of label). The description reinforces the CSS-format constraint but adds no syntax or format detail beyond the schema, so baseline 3 applies.

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 (validate), specific resources (theme CSS against a token contract and WCAG contrast audit), and distinguishes scope explicitly ('Not scoped to cia's own themes'). An agent can tell it apart from all sibling list_/get_/search_/read_ tools 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 Guidelines5/5

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

Provides explicit when-to-use ('works on a fully custom theme you just built, e.g. via derive-theme assemble_prompt'), a crucial when-not-to-use exclusion ('does not compile Sass, give it the output, not .scss source'), and names the equivalent npm check as ground truth. Nothing is left to inference.

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