Create a layer
figma_create_nodeCreates Figma layers such as frames, rectangles, text, components, and sections—optionally inside a parent with auto layout, fills, and other properties—and returns the new node ID.
Instructions
Creates a FRAME, RECTANGLE, ELLIPSE, LINE, POLYGON, STAR, COMPONENT, SECTION or TEXT layer, optionally inside a parent and with properties (auto layout, fills, text…). Returns its id.
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": {
"type": "<type>"
},
"name": "figma_create_node"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| url | No | Figma link (or file key) of the file to edit. Needed only when the plugin is open in more than one file. | |
| name | No | ||
| type | Yes | ||
| index | No | Position among the parent's children | |
| props | No | Plugin API properties to set, e.g. {"fills":"#FF5500","cornerRadius":8,"layoutMode":"VERTICAL","itemSpacing":12,"padding":[16,24],"primaryAxisAlignItems":"CENTER","layoutSizingHorizontal":"FILL","opacity":0.8,"effects":[{"type":"DROP_SHADOW","color":"#00000040","offset":{"x":0,"y":4},"radius":12,"spread":0,"visible":true,"blendMode":"NORMAL"}]}. Text: {"characters":"Hi","fontSize":16,"fontFamily":"Inter","fontStyle":"Bold","lineHeight":24}. Colors accept "#RRGGBB(AA)", "rgba()", or {r,g,b,a}. | |
| width | No | ||
| height | No | ||
| parent_id | No | Parent frame/group/page id; defaults to the current page |