Create or update a design token
tokens_setCreate or update design tokens with type validation: color as hex, dimension with unit, fontFamily as string, number as numeric. Writes token file in place.
Instructions
Create or update a design token. The value is validated against the token type before writing: color must be hex (#0F766E), dimension must have a unit (16px, 1.5rem), fontFamily must be a non-empty string, number must be numeric. Writes the token file in place and returns { name, type, value, created }. This is the only tool in this server that modifies the token file.
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": {
"name": "<name>",
"type": "<type>",
"value": "<value>"
},
"name": "tokens_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Token name as a dot path, e.g. 'spacing.xl' | |
| type | Yes | Token type; determines how the value is validated | |
| value | Yes | Token value, e.g. '#0F766E', '32px', 'Noto Sans JP', '700' |