extract_design_tokens
Extract design tokens from Figma to CSS variables, Style Dictionary, or Tailwind config, with source node IDs and auto-layout spacing for traceability.
Instructions
Extracts all design tokens (colors, typography, spacing) from a Figma file and exports them in your chosen format: CSS custom properties (DTCG-aligned), Style Dictionary JSON, or Tailwind config. Spacing tokens are sourced from auto-layout padding and gap values. Each token includes source node IDs for traceability.
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": {
"file_key": "<file_key>",
"access_token": "<access_token>"
},
"name": "extract_design_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_key | Yes | The Figma file key (from the file URL) | |
| access_token | Yes | Your Figma personal access token | |
| export_format | No | Output format for the exported tokens | css-variables |