Design system health score
score_design_systemScore a design system from its CSS. Pass css and optionally html and pairs (free), or a public url (Pro). The score is out of 100 and weighted: tokens 25 (share of color, size, spacing, radius and shadow declarations that go through a variable, full marks at 60%, scaled down below 8 custom properties), scales 25 (mean of color, type, spacing and radius discipline), components 20 (penalty of 0.20, 0.10 and 0.03 per high, medium and low inconsistency), state coverage 20 (focus-visible weighted 0.5, hover 0.25, pressed and disabled less, minus 0.15 per outline removed without a replacement) and contrast 10 (share of text and background pairs reaching 4.5:1; pairs are taken from rules that set both colors, plus any you state as pairs, a list of {foreground, background, label} or lines such as "#767676 on #ffffff"). An area with nothing to measure is left out and the others are rescaled. The result shows each area's points, the basis, and a ranked fix list with the points each fix would recover.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "score_design_system"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | CSS text to read (a stylesheet, or several concatenated). Free up to 100,000 characters; Pro up to 2,000,000. | |
| url | No | Pro only. Public page whose linked and inline stylesheets are fetched (up to 12 sheets, 5 MB). | |
| html | No | Optional page markup. Any <style> blocks in it are read as CSS too. | |
| pairs | No | Optional stated pairs: an array of {foreground, background, label} or a string with one pair per line. |