figma_export_build_spec
Exports a live Figma subtree as a figma_build spec, preserving styles, variables, layout and text details while flagging unsupported nodes and fallbacks for accurate rebuilds.
Instructions
Turn a live subtree into a figma_build spec. Keys that are already stored are kept; nodes without one get the same derived key the build engine would choose. Fills, strokes and effects use styles or variables when the node is linked to them, and plain values otherwise; rotation, per-corner radii, stroke shape, layout grids, LINE length and text formatting are carried. A BOOLEAN_OPERATION is exported as a live boolean with its operation and ordered operands, not as a flattened SVG. A PATTERN paint carries its file-local source node id and tiling fields; a SHADER paint carries its shader id and property assignments. A node the build cannot express — an unsupported type, a frame created from SVG, a detached instance — is exported as an inline SVG render when svgFallback is on (the default): its appearance survives, but the rebuild is a flattened frame with no original child layers, component identity, overrides, style or variable links and with text outlined, and every fallback is named in warnings. Slices are never flattened. The reply is deliberately lossy and says where: mixed fonts and unrepresentable paints are listed under unsupported/warnings, and direct instance overrides travel as paths plus the fields a rebuild can express while unsupported override fields are named. Read-only; never modifies the file. A truncated export is marked truncated and must not be built as-is.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "figma_export_build_spec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | No | Subtree root; defaults to the single selected node | |
| fileKey | No | Which connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them. | |
| maxDepth | No | Stop below this depth; skipped nodes are reported | |
| maxNodes | No | Stop after this many nodes; sets truncated | |
| svgFallback | No | Export a node with no build-spec equivalent as its inline SVG render; the rebuild is flattened | |
| includeHidden | No | Include hidden layers in the spec |