figma_codegen_bundle
Generate code from Figma designs by fetching a complete bundle with design tree, image and SVG URLs, screenshot, and metadata in one call.
Instructions
Get a complete design-to-code bundle in a single call (REST-only, no plugin needed). Returns:
Compact tree with colors, fonts, layout, image refs, gradients, shadows
Image fill URLs (CDN links for raster images)
Vector/icon SVG URLs (rendered via Figma API)
Screenshot of the node (base64 PNG)
Metadata (node name, dimensions, image counts)
The LLM should use this data to generate code directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Node ID to generate code for (e.g. '74:13142') | |
| fileKey | Yes | Figma file key | |
| maxDepth | No | Max tree depth (default: 15) | |
| screenshotScale | No | Screenshot scale 1-4 (default: 2) | |
| includeScreenshot | No | Include screenshot (default: true) |