Skip to main content
Glama

Combine as variants

figma_combine_as_variants
Idempotent

Combine components into one component set (variants), like Figma's Combine as variants. Name each component "Property=Value, Other=Value" first (figma_rename_node) — Figma derives the variant properties from those names.

Instructions

Combine components into one component set (variants), like Figma's Combine as variants. Name each component "Property=Value, Other=Value" first (figma_rename_node) — Figma derives the variant properties from those names. The components must share a parent; the set is laid out as a wrapping row unless arrange: false. columns: "State" lays it out as a grid instead — a column per State value, a row per combination of the other properties — and returns the grid's page coordinates, for header labels made with figma_create_text outside the set. Then place variants with figma_create_instance and switch them with figma_set_instance_properties. Editors: Design; unverified: Slides.

Input Schema

NameRequiredDescriptionDefault
gapNoSpace between variants, px. Default 24.
nameNoThe set's name, e.g. "Button".
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
arrangeNoLay the variants out in a wrapping row. Default true.
columnsNoA variant property every component names, e.g. "State": one grid column per value.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
descriptionNoWhat the set is for — shown in the assets panel and Dev Mode.
componentIdsYes
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, idempotent, closed-world, so the description's added value is the editor support note ('Design; unverified: Slides'), the shared-parent constraint, the default layout behavior, and the fact that grid mode returns page coordinates for external header labels. It stops short of describing failure modes (e.g. what happens if parents differ) or the return shape outside grid mode.

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?

The purpose and the naming prerequisite are front-loaded, and each subsequent clause carries a distinct operational fact (parent constraint, default layout, grid alternative, follow-up tools, editor support). It is dense but not padded; the em-dash chaining makes it slightly harder to scan than a short bulleted breakdown would be.

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

Completeness4/5

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

For a 9-parameter mutation tool with no output schema, the description covers preconditions, layout modes, the one documented return value (grid coordinates), and the downstream calls. What is missing is any statement of the normal return value (presumably the resulting component set node) and error behavior, which matters given there is no output schema.

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 89%, so most parameters are already documented. The description adds genuine meaning beyond the schema for two of them: `arrange: false` suppresses the wrapping row, and `columns: "State"` produces a column per value and a row per combination of the remaining properties, with page coordinates returned. `gap`, `name`, and `force` semantics are left to the schema.

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?

States a specific verb and resource ('Combine components into one component set (variants)') and anchors it to the Figma UI action of the same name. It is clearly distinguishable from siblings like figma_convert_to_component, figma_group_nodes, or figma_add_component_property.

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

Usage Guidelines5/5

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

Gives explicit preconditions and an ordered workflow: rename components to 'Property=Value' first via figma_rename_node, ensure a shared parent, then place variants with figma_create_instance and switch with figma_set_instance_properties. Alternatives for layout (arrange vs columns) are spelled out with the conditions that select each.

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