get_violations
Identify hardcoded token values in source code and get suggestions for replacing them with design tokens. Filter by category such as colors or spacing.
Instructions
Get hardcoded token values: literals in source code typed inline instead of referencing a design token, bypassing the contract. Read-only, no side effects. Returns JSON with a count, suggestion-coverage stats, and a list 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' (hardcoded values are only detected for these). 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 | No |