set_variable
Create or update a variable in a Figma variable collection, automatically creating the collection if it doesn't exist.
Instructions
Create or update a variable in a Figma variable collection. Creates the collection if collectionName is provided and it doesn't exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionId | No | ID of an existing variable collection | |
| collectionName | No | Name for a new collection (used if collectionId not provided) | |
| name | Yes | Variable name | |
| resolvedType | Yes | Variable type | |
| value | No | Variable value. COLOR: {r,g,b,a} (0-1). FLOAT: number. STRING: string. BOOLEAN: boolean. | |
| modeId | No | Mode ID to set the value for (uses default mode if omitted) |