Token drift compare
compare_token_setsCompare two versions of a design system. Pass before and after (each CSS with custom properties, W3C design tokens JSON, or a flat key/value JSON object; free) or before_url and after_url (Pro). Tokens are matched by name. Reports added, removed, renamed (same value under a new name) and changed tokens, and gives an overall class. Breaking: a token removed or renamed, a type change, a color that moved by deltaE 25 or more, or a size that changed by half or more. Minor: a new token, a visible color shift (deltaE 2 to 25) or size change. Patch: a color change under deltaE 2 or a size nudge of 1px or less. When a side defines no custom properties, the two are compared by the values they use and the class is minor if 15% or more of the values churned, otherwise patch. This is different from check_design_drift, which compares a design file with code at one point in time.
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": "compare_token_sets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Later token set, same formats. | |
| before | No | Earlier token set: CSS, DTCG JSON or flat JSON. | |
| after_url | No | Pro only. Public page whose linked and inline stylesheets are fetched (up to 12 sheets, 5 MB). | |
| before_url | No | Pro only. Public page whose linked and inline stylesheets are fetched (up to 12 sheets, 5 MB). |