Audit CSS for token usage
audit_cssReview 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.
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": "audit_css"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | Yes | CSS source to audit | |
| mode | No | Restrict suggestions to one mode | |
| allow | No | Literal values that are accepted as-is | |
| brand | No | Restrict suggestions to one brand |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | False when at least one error was found | |
| findings | Yes | ||
| errorCount | Yes | ||
| warningCount | Yes |