Skip to main content
Glama

create_component

Create reusable Figma components: convert existing nodes or start from scratch, optionally set name, size, position, and parent, then instantiate for reuse.

Instructions

Create a reusable main component. Pass fromNodeId to convert an existing node into a component (e.g. a frame of vectors from import_svg, or a built layout) — it keeps the node's position and parent unless parentId is given; omit fromNodeId to create an empty component to build into. Then create_instance the result to reuse it. Optionally sized / named / positioned and placed under a parent (default: current page). Returns { ok, nodeId, name, type }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
nameNo
widthNo
heightNo
parentIdNoParent node id (default: current page)
fromNodeIdNoConvert this existing node into a component (default: create an empty component)
Behavior5/5

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

Despite annotations being present (readOnlyHint: false, destructiveHint: false), the description adds valuable behavioral context far beyond that: it explains that converting preserves the node's position and parent unless overridden, defaults to the current page, and discloses the exact return shape. This tells the agent what side effects to expect and how results are returned, exceeding the baseline.

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 description is front-loaded with the core action and structured logically: purpose, two modes with an example, follow-up, options, and return. It is slightly longer than minimal (5 sentences) but each sentence contributes, and the em-dash aside is a natural clarification. It is not wasteful but could be tightened slightly.

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 tool with 7 optional parameters and no output schema, the description covers the main decision points, defaults, and return shape. It addresses both creation modes and implies the use case for importing SVG frames. It does not discuss edge cases like invalid node types or what happens to children, but for routine use it is sufficiently complete.

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?

With schema description coverage at only 29%, the description compensates well. It explains the crucial fromNodeId at length (what it does, with an example, and the preservation behavior) and notes parentId's default. It also groups the remaining numeric/name parameters as 'sized / named / positioned,' giving them meaning without enumerating. This is a strong compensation, though it could still clarify specific units or coordinate origins.

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 'Create a reusable main component,' a specific verb+resource statement, and immediately clarifies the two operational modes (fromNodeId vs. empty). It distinguishes itself from the sibling create_instance by explicitly stating the follow-up step, so the purpose is unambiguous and differentiated.

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?

The description provides clear when-to-use guidance: 'Pass fromNodeId to convert an existing node' and 'omit fromNodeId to create an empty component.' It also points to create_instance as the next step, offering alternative sequencing. However, it does not explicitly cover exclusions (e.g., unsupported node types) or compare against other sibling tools, leaving a small gap in full guidance.

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