Skip to main content
Glama
southleft

figma-console-mcp

by southleft

figma_create_component_set

Creates a Figma component set with variants in one call, either by generating variants from a base component and property axes or by combining existing components.

Instructions

Create a component set with variants in one call — replaces hand-written figma.combineAsVariants scripts.

Two modes:

  1. Generate from a base component: pass baseComponentId + properties (variant axes). The base is cloned for every combination of the axes ({ State: ['default','hover','disabled'], Size: ['sm','lg'] } → 6 variants), each named 'Prop=Value' comma-joined (e.g. 'State=hover, Size=sm'), then combined into a set. The base component itself becomes the FIRST variant (same node ID), so existing instances of the base survive as instances of that variant.

  2. Combine existing components: pass componentIds, optionally with variantProperties (aligned 1:1) to rename each component to Prop=Value form before combining.

Figma derives the variant property definitions from the names; they live on the SET (componentPropertyDefinitions), not on individual variants. The result includes each variant's key — instantiate with a VARIANT's key/nodeId via figma_instantiate_component, not the set's key.

Set autoArrange:true to lay the new set out as a labeled grid inside a white container (same layout as figma_arrange_component_set). Requires Desktop Bridge plugin.

SIZE GUIDANCE: hard cap 100 variants. The timeout auto-scales with variant count (~1.2s/variant, 30s floor / 2min cap), but above ~40 variants the single-pass clone+combine gets slow and heavy base components may still push the limit — prefer splitting large matrices into multiple sets (e.g. one set per Size).

Input Schema

NameRequiredDescriptionDefault
nameNoName for the component set (e.g., 'Button'). Defaults to Figma's derived name.
parentIdNoNode ID of the container (frame/section) to create the set in. Defaults to the current page.
positionNoPosition of the set within its parent.
propertiesNoVariant property axes — required with baseComponentId. Example: { State: ['default','hover','disabled'], Size: ['sm','lg'] } creates 6 variants. Max 100 combinations. Names and values must not contain '=' or ','.
autoArrangeNoIf true, arrange the new set in a labeled grid (columns = last property, rows = other properties) inside a white container — same in-place layout as figma_arrange_component_set.
componentIdsNoNode IDs of existing COMPONENT nodes to combine as variants. Mutually exclusive with baseComponentId. Components already inside a component set are rejected.
arrangeOptionsNoGrid layout options, used when autoArrange is true.
baseComponentIdNoNode ID of an existing COMPONENT to use as the base. Cloned per property combination; becomes the set's first variant (keeps its node ID, so placed instances survive). Mutually exclusive with componentIds.
variantPropertiesNoOnly with componentIds: one property map per component, aligned by index — e.g. [{ State: 'default' }, { State: 'hover' }]. Each component is renamed to 'Prop=Value, ...' before combining. Without this, existing names are kept (names lacking '=' become 'Property 1=<name>').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses the clone-per-combination side effect, that the base keeps its node ID so existing instances survive, that property definitions live on the set rather than variants, that components already in a set are rejected, the 100-variant cap, timeout auto-scaling, and the Desktop Bridge plugin requirement for autoArrange.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then cleanly sectioned into Two modes and SIZE GUIDANCE, so an agent can skim to the relevant mode. It is on the long side and the size-guidance paragraph could be tightened, but the detail is load-bearing for a 9-parameter tool with no annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by stating what the result contains (each variant's key) and the critical follow-up that you must instantiate with a variant's key/nodeId via figma_instantiate_component rather than the set's key. Combined with mode coverage, limits, and prerequisites, an agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description goes further by explaining the expansion semantics of `properties` (a concrete 2-axis → 6-variant example) and the 1:1 index alignment of variantProperties, plus the naming convention that Figma derives. It does not add much for name/parentId/position, which is acceptable given the schema already documents them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb + resource ("Create a component set with variants in one call") and immediately frames it against the manual alternative (hand-written figma.combineAsVariants scripts). The two numbered modes make it unambiguous which creation path is being invoked, including the destructive side effect that the base component becomes a variant.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes between the two modes (baseComponentId + properties vs componentIds ± variantProperties) and states the mutual exclusivity, plus a concrete size heuristic (split above ~40 variants, hard cap 100). It stops short of naming a sibling tool it should be chosen over instead, so no exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools