Skip to main content
Glama

Add component property

figma_add_component_property
Idempotent

Give a component (or component set) a property that instances can change: TEXT (wire it to text layers with bindNodeIds — instances then edit the label without detaching), BOOLEAN (show/hide the bound layers), INSTANCE_SWAP (swap a…

Instructions

Give a component (or component set) a property that instances can change: TEXT (wire it to text layers with bindNodeIds — instances then edit the label without detaching), BOOLEAN (show/hide the bound layers), INSTANCE_SWAP (swap a nested icon instance; default = a component id), VARIANT (on a set only). Returns the property key (name + #id) that figma_set_instance_properties accepts — the plain name works too. Called again with a name and type that exist, it reuses that property (reused: true) and wires the new layers; to rename, re-default or unwire use figma_edit_component_property. A slot is figma_create_slot. Editors: Design; unverified: FigJam, Slides.

Input Schema

NameRequiredDescriptionDefault
nameYese.g. "Label", "Show icon".
typeYes
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.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
bindNodeIdsNoLayers inside the component this property drives.
componentIdYesA COMPONENT, or a COMPONENT_SET — not a single variant inside a set.
defaultValueYesText, "true"/"false" for BOOLEAN, a component id for INSTANCE_SWAP.
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.
preferredValuesNoINSTANCE_SWAP only: component or component-set ids offered first in the swap menu.

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.9/5.0
Behavior5/5

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

Annotations already mark it non-read-only, idempotent, non-destructive, and closed-world. The description adds valuable behavior beyond that: it returns a property key (name + #id) usable by figma_set_instance_properties, re-calling with an existing name/type reuses the property and reports reused: true, and it lists editor support. This is rich context not derivable from annotations.

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

Conciseness5/5

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

The description is dense but front-loaded: it defines the core action, then explains each type and key behaviors in compact clauses. Every sentence carries actionable information, including reuse behavior and sibling routing, with no filler.

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?

There is no output schema, but the description explains the return value (the property key and that plain names also work). It covers all nine parameters implicitly through type-specific guidance and explicitly mentions editors and sibling alternatives, leaving no material gaps for correct invocation.

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 high (89%), so the baseline would be 3. The description adds type-specific semantics beyond the schema: TEXT uses bindNodeIds to wire text layers, BOOLEAN shows/hides bound layers, INSTANCE_SWAP default is a component id, and VARIANT is only on sets. This clarifies parameter behavior across types, though some schema descriptions already cover the per-parameter mechanics.

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?

The description opens with a specific verb and resource ('Give a component (or component set) a property that instances can change') and then enumerates the four property types. It explicitly distinguishes itself from sibling tools like figma_edit_component_property, figma_set_instance_properties, and figma_create_slot.

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?

It states clear conditions: VARIANT is 'on a set only', bindNodeIds wires text layers, and reuse happens when the name/type already exist. It also routes rename/re-default/unwire actions to figma_edit_component_property and slot creation to figma_create_slot, with editor availability noted.

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