Skip to main content
Glama

Audit CSS for token usage

audit_css
Read-onlyIdempotent

Review CSS snippets to detect hard-coded colors/dimensions, deprecated tokens, and unknown token references. Returns errors to help fix generated or legacy CSS.

Instructions

Audit a CSS snippet: reports hard-coded colors and dimensions (with the token to use instead), usages of deprecated tokens (with their replacement) and references to tokens that do not exist. Returns ok=false when there is at least one error. Use it to review generated or legacy CSS.

Input Schema

NameRequiredDescriptionDefault
cssYesCSS source to audit
modeNoRestrict suggestions to one mode
allowNoLiteral values that are accepted as-is
brandNoRestrict suggestions to one brand

Output Schema

NameRequiredDescriptionDefault
okYesFalse when at least one error was found
findingsYes
errorCountYes
warningCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuine behavioral context beyond that: the categories of findings it emits and the ok=false contract when at least one error is present. It does not describe pagination or result ordering, but for a non-destructive, idempotent audit that is minor.

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 sentences, zero filler, front-loaded with the action and the enumerated findings, then the usage cue. Every clause carries information an agent needs for selection.

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?

With a 100% covered schema and an output schema present, the description only needs to cover purpose and behavior, which it does. It could be slightly stronger by clarifying how suggestions are scoped by mode/brand, but nothing essential for correct invocation is missing.

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%, so css, mode, brand, and allow are already documented in the schema. The description adds no semantics for mode/brand scoping or the allow-list behavior beyond what the schema provides, so the 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 (audit) and resource (CSS snippet) and enumerates exactly what it reports: hard-coded colors/dimensions with replacement tokens, deprecated token usage, and nonexistent token references. This distinguishes it clearly from siblings such as lint_naming, search_tokens, and find_token_for_value.

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?

"Use it to review generated or legacy CSS" gives clear when-to-use context. It does not name alternatives or state when-not to use it (e.g., versus lint_naming), so it falls just short of explicit routing guidance.

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