Detect token drift in a CSS file
tokens_check_driftScans a CSS file for hardcoded hex colors and px values, comparing them to design tokens to identify mismatches and suggest fixes.
Instructions
Scan a CSS file for hardcoded hex colors and px values, and compare each against the design tokens. Values that exactly match a token are reported as 'matched'; values that match no token are reported as 'drift', each with the nearest token as a fix suggestion. Returns { checked_file, matched, drift: [{ value, line, kind, nearest_token, nearest_value }] }. Use this after editing styles to keep code and design tokens in sync.
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_path": "<css_path>"
},
"name": "tokens_check_drift"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css_path | Yes | Path to the CSS file to scan |