create_element
Create rectangles, ellipses, text, boards, or SVGs on a Penpot page. Check layout constraints first to ensure proper placement.
Instructions
Create a shape element (rectangle, ellipse, text, board, svg) on a Penpot page. Use get_constraints FIRST to understand layout boundaries before creating elements.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileId": "<fileId>",
"pageId": "<pageId>",
"type": "<type>",
"name": "<name>"
},
"name": "create_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X position | |
| y | No | Y position | |
| name | Yes | Layer name (semantic, e.g. 'hero-background') | |
| text | No | Text content (for type=text) | |
| type | Yes | Shape type to create | |
| width | No | Width in px | |
| fileId | Yes | Penpot file ID | |
| height | No | Height in px | |
| pageId | Yes | Target page ID | |
| fillColor | No | Fill color hex (e.g. #6366f1) | |
| svgContent | No | SVG string (for type=svg) | |
| cornerRadius | No | Corner radius in px |