Import design tokens
import_tokensConvert W3C-style Design Tokens JSON into Figma variables and optional paint styles, creating or updating a collection and Default mode with typed values.
Instructions
Import a W3C-style Design Tokens JSON object into Figma variables (and optionally paint styles). Accepts nested {group:{name:{$type,$value}}} or plain nested values (types inferred from values). Creates/updates a variable collection (default 'Design Tokens') and a Default mode, then sets values. color -> COLOR variable + paint style, number/dimension -> FLOAT, string -> STRING, boolean -> BOOLEAN.
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": {
"tokens": "<tokens>"
},
"name": "import_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokens | Yes | ||
| modeName | No | ||
| createStyles | No | ||
| collectionName | No |