get_violations
Identify hardcoded literals that violate design contracts. Filter by category (colors, spacing, typography, etc.) to get violations with suggested replacement tokens for consistent UI.
Instructions
Get token-misuse violations: hardcoded literals in source code that bypass the design contract. Read-only, no side effects. Returns JSON with violation count, suggestion-coverage stats, and a list of violations with file:line:column, the captured literal, the surrounding utility (e.g. 'bg-[#ff0000]'), and an optional smart-match suggestion when a contract token has the same value. Pass category to filter: 'all' | 'colors' | 'spacing' | 'typography' | 'borderRadius' | 'shadows'. Call this BEFORE generating UI with literal values — prefer the suggested token over a hardcoded literal. For available tokens to use instead, use get_design_context or get_token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes |