Skip to main content
Glama

add_component_property

Add a BOOLEAN, TEXT, or INSTANCE_SWAP property to a component. Provide componentId, name, type, and defaultValue; returns propertyId 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
Behavior4/5

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

Annotations indicate non-destructive and non-read-only. Description adds that the property starts inert and requires binding to become functional, which is beyond annotation scope. No contradiction.

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?

Description is comprehensive but slightly verbose. Each sentence adds information, but it could be tightened. Front-loaded with key information (what it does, types).

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, but description returns the object shape. Covers lifecycle (inert → bind), type-specific notes, and differentiation from other tools. Complete for a property creation tool with good annotations.

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?

Input schema covers 100% of parameters. Description adds value by explaining that defaultValue must match type type, preferredValues is INSTANCE_SWAP only, and returns propertyId for subsequent operations. Schema already detailed, so score is above baseline but not 5.

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 clearly states it declares a component property on a component or variant set, lists the three types (BOOLEAN, TEXT, INSTANCE_SWAP), and distinguishes itself from sibling tools like bind_component_property and 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 Guidelines4/5

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

Provides guidance that the property starts inert and must be bound using bind_component_property, with specific layer attachments per type. Also notes that VARIANT properties come from combine_as_variants, not this tool. Could explicitly state when not to use, but sufficient.

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