combine_as_variants
Merge multiple Figma components into a single variant set. Name components with variant syntax before combining to create a unified component set.
Instructions
Combine two or more existing COMPONENT nodes into a single COMPONENT_SET (a variant set). Name each component with Figma variant syntax (e.g. "Size=Small", "Size=Large") beforehand so the set derives its properties. The components are reparented into the new set under parentId (default: the first component's current parent). Returns { ok, nodeId, name, type }.
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": {
"nodeIds": "<nodeIds>"
},
"name": "combine_as_variants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name for the resulting component set | |
| nodeIds | Yes | Component node ids to combine (all must be COMPONENT nodes; at least 2) | |
| parentId | No | Parent to place the set under (default: the first component's parent) |