bundle
Export a saved Figma node or exact instance sublayer as a ZIP with nodes, variables, assets, reference render, and context.md; include variant states and evidence gaps when requested.
Instructions
Write a design bundle zip for one node or exact instance sublayer: nodes, variables, assets, reference render, context.md. When the user requests related component states, pass states=true to include their explicit variants and evidence gaps.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"node": "<node>",
"out": "<out>"
},
"name": "bundle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | Yes | output path for the bundle ZIP; unless the user names one, use .figlens/exports/ under the project root, created with a .gitignore containing * so it stays out of Git; create the parent directory first | |
| file | Yes | the saved .fig: a local path (absolute recommended), or gs://bucket/object using gcloud; remote sources are unavailable with --root | |
| name | No | frame name for the manifest | |
| node | Yes | a stored node id (12:345 or 12-345), full instance sublayer id (I12:345;67:89) from inspect/nodes, or a Figma URL with ?node-id= | |
| states | No | include design/states.json and a bounded context.md summary; retains inspect's source, unknown and truncation markers; default false | |
| fileKey | No | Figma file key for the manifest | |
| hashSource | No | record the .fig's sha256 as manifest.json source.sha256 (null when the file changed while bundling), to trace a built screen to the saved revision; reads the whole file once more; default false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| nodeId | Yes | ||
| warnings | Yes | missing assets, known rendering limits and truncated optional state inventory; missing-assets.json contains only asset failures; design/nodes.json has per-node _figlens.renderDiagnostics; design/states.json has inventory coverage when requested |