generate_scale
Generate mathematical scales for design tokens using linear, modular, exponential, fibonacci, golden ratio, or harmonic strategies. Returns token-ready values with configurable base, step, unit, and rounding.
Instructions
Generate a mathematical scale for design tokens. Supports linear, modular (geometric), exponential, fibonacci, golden ratio, harmonic, and hybrid strategies. Returns token-ready values.
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": {
"strategy": "<strategy>"
},
"name": "generate_scale"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Base/starting value | |
| step | No | Step size for linear scales | |
| unit | No | CSS unit for output | px |
| count | No | Number of scale steps | |
| ratio | No | Ratio for modular scales (e.g., 1.25, 1.5, 1.618) | |
| roundTo | No | Rounding strategy | integer |
| strategy | Yes | Mathematical scale strategy | |
| labelPrefix | No | Prefix for generated labels (e.g., 'spacing') |