Skip to main content
Glama
tvolodi

penpot-headless

by tvolodi

penpot_add_shapes

Add shapes like rectangles, frames, text, circles, paths, boolean operations, or images to a page in a Penpot file.

Instructions

Add one or more shapes (rect, frame, text, circle, path, bool, image) to a page in a Penpot file. "circle" is an ellipse bounded by x/y/width/height (width === height for a true circle). "path" takes a "content" array of path commands ({ command: "move-to"|"line-to"|"curve-to"|"close-path", params: {x,y,...} }); its bounding box is derived automatically from the commands. "bool" is a boolean operation (boolType: "union"|"difference"|"intersection"|"exclusion") over its children — add the bool shape first (with an explicit "id"), then add children with "parentId" matching that id (same pattern as frames); Penpot's editor computes the visual result when the file is opened. "image" displays an uploaded media object — first call penpot_upload_media to get a mediaId, then provide mediaId/mediaWidth/mediaHeight (source pixel dimensions) along with x/y/width/height for the canvas placement. Colors accept either a literal hex string or a { token: "name" } reference resolved against the project token file; the same applies to numeric spacing/radius fields (layout gaps/padding, layoutItem margins/min/max sizes, corner radii r1-r4), resolved against the token file's "spacing"/"radii" tables, and to a shape's "shadows" array (each entry either an inline { style, color, opacity, offsetX, offsetY, blur, spread } object or a { token: "name" } reference into the token file's "shadows" table). Shapes may be rotated via the "rotation" field (degrees, clockwise, about the shape's center). Frames may declare flex or grid auto-layout via "layout"; any shape may set "layoutItem" to control its own placement within an auto-layout parent (sizing, alignment, margins, and, for grid parents, row/column).

Input Schema

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

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

With no annotations, the description carries the full burden. It transparently explains behavioral details: how shapes are added, the prerequisite for images (calling another tool), token resolution via file, rotation mechanics, and auto-layout rules. It also notes that bool shapes' visual result is computed when the file is opened.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph that covers extensive detail. While the first sentence is clear and front-loaded, the overall length could be trimmed or structured with bullet points for easier parsing. It is comprehensive but not concise.

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?

Given the complex input schema and no output schema, the description is fairly complete. It covers shape types, token references, auto-layout, prerequisites (image upload), and rotation. It lacks details on return values, error handling, and effects on the page, but the core functionality is well explained.

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 description coverage is 0%, so the description must add meaning. It thoroughly explains the 'shapes' parameter with all shape types and their sub-properties. However, it provides little to no explanation for the 'fileId', 'pageId', and 'tokensPath' parameters, leaving the agent to infer their roles.

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 the tool adds one or more shapes to a Penpot page and lists the specific shape types (rect, frame, text, etc.). This distinguishes it from sibling tools like penpot_update_shapes or penpot_delete_shapes, though it does not explicitly contrast with penpot_add_component_instance.

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

Usage Guidelines2/5

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

The description provides detailed guidance on when to use each shape type within the tool, but it does not discuss when to prefer this tool over alternatives (e.g., penpot_update_shapes for modifying existing shapes, penpot_clone_shapes for duplicating). No 'when not to use' or sibling comparisons are given.

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