get_design_context
Reads Figma frames or current selection and returns a compact, code-oriented spec for generating UI code, covering layout, styles, text, components, variables, and assets.
Instructions
Read a Figma design from the open file through the plugin and return a compact, code-oriented spec (layout, styles, text, components, variables, assets) for generating UI code. Uses the given nodeIds or the current selection. Spec format: each node references shared values in styles by id (layout*, fill*, stroke*, effect*, text*). Layout values are CSS-like (flex, gap, padding, sizing fill/hug/fixed). exportAs: svg marks icons/vectors to export as assets instead of rebuilding them; assets lists icons and image fills to download with download_design_assets. designStyles and variables give design-token names to map onto the project's theme.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeIds | No | Node IDs to read. Defaults to the current selection in Figma. | |
| maxDepth | No | Maximum depth of children to include (default: unlimited) | |
| includeHidden | No | Include hidden layers (default: false) |