Export tokens to code
tokens_exportExport design tokens as CSS custom properties, Tailwind config, or Figma Variables JSON, with optional file output.
Instructions
Export all design tokens in one of three formats: 'css' (CSS custom properties in a :root block), 'tailwind' (a Tailwind theme.extend fragment as CommonJS), or 'figma-variables' (a JSON shape close to Figma's Variables API with name/resolvedType/value). Returns { format, code }. Optionally pass out_path to also write the result to a 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": {
"format": "<format>"
},
"name": "tokens_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | Output format | |
| out_path | No | Optional file path to write the exported code to |