Skip to main content
Glama

create_component

Convert an existing node into a reusable component or create an empty one to build into. Specify parent, size, and position to organize the canvas 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)
Behavior4/5

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

Annotations indicate mutation but non-destructive. Description adds: preserves node position/parent, handles fromNodeId, returns { ok, nodeId, name, type }. No contradictions, but lacks detail on potential side effects.

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?

Two sentences, front-loaded with purpose. Second sentence is long but packs essential details (two modes, placement, return value). Minor improvement possible in breaking up.

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?

Covers core behavior, both modes, optional parameters, and return schema. Missing details like default sizing or invalid fromNodeId, but sufficient for typical use.

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 coverage is low (29%). Description explains fromNodeId and parentId well, and implies x,y,width,height are for sizing/positioning. Does not detail all parameters but adds meaningful context.

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 the tool's purpose: 'Create a reusable main component.' It distinguishes between creating from an existing node or empty, and mentions the follow-up action 'create_instance', differentiating it from siblings.

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?

Explicitly guides when to use 'fromNodeId' vs omit, and recommends 'create_instance' for reuse. Provides context on default parent (current page) and keeps position unless overridden.

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