export_batch
Export many nodes from a saved Figma .fig file in one call, one file per item, instead of repeated export calls for icons and photos.
Instructions
Export many nodes of one file in a single call, one file per item; use it instead of repeated export calls for a screen's icons and photos. Each item takes the options export takes (node, out, bounds, scale, quality, maxKb, maxSize, hide; the format follows out's extension) except matchDir. Create the output directories first. At most 64 items, distinct out paths, all inside the configured roots; a malformed item or a path outside the roots fails the whole call before anything is written. Items then export in order: one that fails (a missing or hidden node, a file over maxKb) is reported with its error and the others still export, so check each entry's error. Returns a manifest, no inline images: per item node, path, width, height, bytes, quality, layoutBox, renderBox and warnings, or node, path and error; warnings say when the drawn area reaches past the layout box (a badge or shadow), as export's do. Once the files written reach 256 MiB, the remaining items fail with a budget error; export them in another call.
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>",
"items": "<items>"
},
"name": "export_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | the saved .fig: a local path (absolute recommended), or gs://bucket/object using gcloud; remote sources are unavailable with --root | |
| items | Yes | 1-64 objects {node, out, bounds?, scale?, quality?, maxKb?, maxSize?, hide?}, each as the export tool's parameters of those names |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| items | Yes | in request order: node, path and either the export fields (width, height, bytes, quality, layoutBox, renderBox, warnings) or error | |
| failed | Yes | items with an error; the others were written |