Skip to main content
Glama

add_component_property

Create a configurable property on a Figma component or variant set—boolean, text, or instance swap—to make designs adaptable. Returns property ID for binding and editing.

Instructions

Declare a component property on a component (or its variant set): BOOLEAN (show/hide a layer), TEXT (editable text), or INSTANCE_SWAP (swappable nested instance). The property starts inert — attach it to a layer with bind_component_property (BOOLEAN→visible, TEXT→characters, INSTANCE_SWAP→mainComponent) for it to do anything. defaultValue must match the type (boolean / string / a component key string); preferredValues (INSTANCE_SWAP only) pre-populates the swap menu. VARIANT properties come from combine_as_variants, not here. Returns { ok, componentId, propertyId, name } — pass propertyId to bind / edit / delete / set_instance_properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesProperty name, e.g. "Show Icon"
typeYesProperty type
componentIdYesComponent or component-set id (a variant resolves to its set)
defaultValueYesDefault: boolean (BOOLEAN), string (TEXT), or a component key (INSTANCE_SWAP)
preferredValuesNoINSTANCE_SWAP only: components/sets offered in the swap menu
Behavior5/5

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

The description goes beyond the minimal annotations by revealing key behaviors: the property is inert until bound, defaultValue must match the type, preferredValues only applies to INSTANCE_SWAP, and the return shape is { ok, componentId, propertyId, name } with instructions to pass propertyId to subsequent operations. These details are not present in annotations and add meaningful behavioral context.

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 efficiently organized: it starts with the core action, then explains the inert/bind workflow, type constraints, an important exclusion, and the return value. Every sentence contributes necessary information without redundancy or 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?

The description is fully self-contained for a moderately complex tool: it defines property types, explains the attach step, gives default value rules, notes the variant-property exception, and describes the return value. Since no output schema exists, including the return shape and pointing to related tools for subsequent actions makes this exceptionally complete.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already thoroughly documents each parameter. The description reinforces type constraints (e.g., 'defaultValue must match the type') and the INSTANCE_SWAP-only nature of preferredValues, but does not substantially add new parameter-level semantics beyond what the schema already states.

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: 'Declare a component property on a component (or its variant set)'. It clearly distinguishes the action from related tools by contrasting with bind_component_property and explicitly excluding variant properties ('VARIANT properties come from combine_as_variants, not here').

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?

The description provides concrete usage guidance by explaining that the property 'starts inert' and must be attached via bind_component_property, with type-to-layer mappings. It also gives an explicit exclusion for variant properties and points to the correct tool (combine_as_variants), making when-to-use versus alternatives very clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awdr74100/figwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server