MCP Tools
create_component
Convert an existing FRAME or GROUP node into a reusable Figma component.
Replaces a FRAME or GROUP node in-place with a ComponentNode, preserving its size, styles, layout, and children. Returns the new component node ID and component key. Use get_selected_node or find_node to discover the node ID of the frame or group to convert.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| nodeId | string | Required | The Figma node ID of the FRAME or GROUP to convert (from get_selected_node output) |
| name | string | Optional | Name for the new component. Defaults to the source node name. |
| description | string | Optional | Optional description for the component. |
Example prompt
Try asking: Convert the button frame into a reusable component named 'Button/Primary'.
Tips
- Use descriptive names with slashes for component grouping (e.g. 'Button/Primary').
- The component key returned can be used later with create_instance.
- Only FRAME and GROUP nodes can be converted — TEXT and RECTANGLE nodes are not supported.