get_selection
Get details of nodes selected in Figma, including layout properties and variant data. Use returned node IDs to capture screenshots or analyze designs.
Instructions
Get the nodes currently selected in Figma, with full property details.
Prerequisites: Requires Figma bridge running and plugin connected. The user must have selected at least one node in Figma. Returns an empty array if nothing is selected.
Returns on success: Array of node objects. Each node includes: { id: string (node ID usable in other tools), name: string, type: string (e.g. "FRAME", "COMPONENT", "TEXT", "RECTANGLE"), width: number, height: number, x: number, y: number, layoutMode?: "HORIZONTAL"|"VERTICAL"|"NONE", primaryAxisSizingMode?: string, counterAxisSizingMode?: string, paddingTop?: number, paddingRight?: number, paddingBottom?: number, paddingLeft?: number, itemSpacing?: number, fills?: array, strokes?: array, effects?: array, styles?: Record<string, string>, variantProperties?: Record<string, string> (only for component instances) }
Error behavior: Throws "Figma not connected" if no plugin is connected.
Use this tool: to retrieve node IDs for use in capture_screenshot or analyze_design; to inspect layout properties of a selected component; or to read variant properties before writing a spec.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||