Create Frame
create_frameCreate a Figma frame with optional fill, stroke, and complete auto-layout controls to structure UI components.
Instructions
Create a frame (container) with optional fill/stroke and full auto-layout configuration.
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": {
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>",
"parentId": "<parentId>",
"parentNodeName": "<parentNodeName>"
},
"name": "create_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X position | |
| y | Yes | Y position | |
| name | No | Optional non-empty name for the frame | |
| width | Yes | Width of the frame | |
| height | Yes | Height of the frame | |
| parentId | Yes | Parent node ID to append the frame to | |
| fillColor | No | Fill color in RGBA format | |
| layoutMode | No | Auto-layout mode for the frame | |
| layoutWrap | No | Whether the auto-layout frame wraps its children | |
| paddingTop | No | Top padding for auto-layout frame | |
| itemSpacing | No | Distance between children in auto-layout frame. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN. | |
| paddingLeft | No | Left padding for auto-layout frame | |
| strokeColor | No | Stroke color in RGBA format | |
| paddingRight | No | Right padding for auto-layout frame | |
| strokeWeight | No | Stroke weight | |
| paddingBottom | No | Bottom padding for auto-layout frame | |
| parentNodeName | Yes | The parent node's current exact name, passed back verbatim from `node_info`. | |
| layoutSizingVertical | No | Vertical sizing mode for auto-layout frame | |
| counterAxisAlignItems | No | Counter axis alignment for auto-layout frame | |
| primaryAxisAlignItems | No | Primary axis alignment for auto-layout frame. Note: When set to SPACE_BETWEEN, itemSpacing will be ignored as children will be evenly spaced. | |
| layoutSizingHorizontal | No | Horizontal sizing mode for auto-layout frame |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ID of the created frame | |
| name | No | Name of the created frame | |
| error | No | ||
| parentId | No | ID of the parent the node was placed into — confirm containment without a follow-up read |