Skip to main content
Glama

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

NameRequiredDescriptionDefault
outYesoutput 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
fileYesthe saved .fig: a local path (absolute recommended), or gs://bucket/object using gcloud; remote sources are unavailable with --root
nameNoframe name for the manifest
nodeYesa 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=
statesNoinclude design/states.json and a bounded context.md summary; retains inspect's source, unknown and truncation markers; default false
fileKeyNoFigma file key for the manifest
hashSourceNorecord 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

NameRequiredDescriptionDefault
pathYes
nodeIdYes
warningsYesmissing 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.3
    • addedInput schema / properties / hashSource
      Added value: +{
      +  "default": false,
      +  "description": "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",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv0.9.3
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • changedInput schema / properties / out / description
      Previous value: -"output path for the bundle ZIP; create the parent directory first"New value: +"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"
  3. Changed8 schema fields changedv0.7.2
    • addedInput schema / additionalProperties
      Added value: +true
    • changedInput schema / properties / file / description
      Previous value: -"the .fig file (File > Save local copy): an absolute path, or gs://bucket/object"New value: +"the saved .fig: a local path (absolute recommended), or gs://bucket/object using gcloud; remote sources are unavailable with --root"
    • addedInput schema / properties / file / minLength
      Added value: +1
    • changedInput schema / properties / node / description
      Previous value: -"a node id (12:345 or 12-345) or a Figma URL with ?node-id="New value: +"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="
    • changedInput schema / properties / out / description
      Previous value: -"absolute path of the .zip to write"New value: +"output path for the bundle ZIP; create the parent directory first"
    • addedInput schema / properties / out / minLength
      Added value: +1
    • addedInput schema / properties / states
      Added value: +{
      +  "default": false,
      +  "description": "include design/states.json and a bounded context.md summary; retains inspect's source, unknown and truncation markers; default false",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / warnings / description
      Previous value: -"assets the bundle could not include; missing-assets.json has details"New value: +"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"
  4. First observed

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It discloses the artifact composition and that states adds variants plus 'evidence gaps', but says nothing about overwrite behavior, destination defaults, permissions, or failure modes for what is fundamentally a disk-writing mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, with the core purpose front-loaded and the conditional states guidance second. Nothing needs trimming and nothing is buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and full parameter documentation, the description need not explain return values, and it does cover the bundle's contents. However, for a write tool with zero annotations, the absence of any overwrite, atomicity, or destination-caveat language leaves a meaningful behavioral gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all seven parameters thoroughly (out path conventions, node id formats, hashSource side effects). The description adds only the user-trigger semantics for states=true, which the schema does not phrase that way, making its marginal contribution modest.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Write a design bundle zip') and scopes it to one node or exact instance sublayer, then enumerates the contents (nodes, variables, assets, reference render, context.md). This is clear enough to distinguish it from a plain asset export, though it never names or contrasts the siblings export/export_batch that an agent might otherwise choose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Offers one concrete usage rule: set states=true when the user asks for related component states. There is no guidance on when to pick this tool over export/export_batch or inspect, and no when-not conditions, so tool selection remains largely inferential.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.