Skip to main content
Glama
tvolodi

penpot-headless

by tvolodi

penpot_create_component

Register a shape tree as a reusable Penpot component. Assign explicit IDs to shapes for nesting; the unparented shape becomes the component root. Returns a component ID for placing instances.

Instructions

Register a new shape tree as a Penpot component (its "main instance"). Accepts the same shape specs as penpot_add_shapes (rect/frame/text, with layout/rotation/etc.); give each shape an explicit "id" so children can nest under a sibling via matching "parentId"/"frameId". The one shape not parented to a sibling in this call becomes the component root. Returns the componentId, usable with penpot_add_component_instance to place copies elsewhere.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileIdYes
pageIdYes
shapesYes
tokensPathNo/app/tokens.json
componentNameYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes that the tool registers a component (a creation action) and returns a componentId. It explains the shape tree structure and root detection, but does not disclose whether the operation is destructive, requires specific permissions, or if it modifies the page content. The disclosure is adequate but lacks depth.

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 concise, with three sentences that front-load the main action, then detail the shapes parameter, and finally state the return value. Every sentence contributes valuable information. There is no fluff, though a more structured format (e.g., bullet points) could improve scanability.

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?

Given the tool's complexity (5 params, no output schema), the description covers the core concepts (shapes structure, root detection, return value) but misses the 'tokensPath' parameter and any prerequisites (e.g., fileId/pageId must exist). It does not mention error conditions or constraints like unique component names. Completeness is adequate but not thorough.

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?

The input schema has 0% description coverage, so the description must compensate. It adds significant meaning for the 'shapes' parameter by explaining id, parentId, and frameId usage, and that the unparented shape becomes the root. However, it does not explain the 'tokensPath' parameter at all. This leaves a gap, but overall improves understanding beyond the bare schema.

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 clearly states that the tool registers a new shape tree as a Penpot component, specifying the verb 'register' and the resource 'component'. It distinguishes the tool from siblings by mentioning the returned componentId is usable with penpot_add_component_instance, but does not explicitly differentiate from penpot_add_shapes. The purpose is specific and actionable.

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 context for using the tool: to create a component from a shape tree. It explains the relationship with penpot_add_shapes (same shape specs) and how nesting works via id/parentId, establishing when this tool should be used. It does not explicitly state when not to use it, but the guidance is sufficient for an AI agent to infer the correct use case.

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/tvolodi/penpot-mcp'

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