Skip to main content
Glama

add_component_property

Adds a BOOLEAN, TEXT, INSTANCE_SWAP, or VARIANT property to a Figma component or component set, optionally binding it to a child node’s visibility, text, or main component.

Instructions

Add a component property (BOOLEAN, TEXT, INSTANCE_SWAP, VARIANT) to a component or component set.

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": {
      "nodeId": "<nodeId>",
      "name": "<name>",
      "type": "<type>",
      "defaultValue": "<defaultValue>"
    },
    "name": "add_component_property"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
nameYes
typeYes
nodeIdYesFigma node id, e.g. '12:34'
bindToNodeIdNoChild node whose visibility (BOOLEAN) / characters (TEXT) / mainComponent (INSTANCE_SWAP) is controlled by the property
defaultValueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the word 'Add' is the only indication that this is a mutation. The description does not explain duplicate-name handling, validation failures, effects on existing instances, or how property bindings and defaults are applied.

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?

A single front-loaded sentence communicates the action, supported types, and target without filler. The parenthetical is compact and readable even though it duplicates structured enum information.

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

Completeness3/5

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

Together with the schema, the description is minimally sufficient to identify the operation and its inputs, including the useful binding details already present in the schema. However, for a six-parameter mutation with four required inputs and no annotations, the missing defaultValue semantics and operational constraints remain meaningful gaps.

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

Parameters2/5

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

At 50% schema coverage, the description needed to compensate for undocumented required inputs, but its type list merely repeats the schema enum. It adds the eligible target for nodeId, yet gives no semantics for name or defaultValue, particularly which string or boolean values are appropriate for each property type.

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

Purpose4/5

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

The description uses a specific verb and resource, lists the four supported property types, and identifies components and component sets as eligible targets. It clearly conveys the operation, but does not explicitly differentiate it from siblings such as create_component or combine_as_variants.

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

Usage Guidelines3/5

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

The target and type restrictions provide a concrete use case: adding one of these property types to an existing component or component set. There is no guidance on prerequisites, type-specific target restrictions, when binding is needed, or when another tool would be preferable.

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