figma_export_ui_atlas
Export a Figma sheet frame as one PNG plus a JSON manifest with sprite rects in the PNG's own pixels, flagging overlaps, off-image sprites, bleed, and duplicate names so the sheet stays sliceable.
Instructions
Export a sprite sheet for a game build: ONE PNG plus a JSON manifest whose rects are in that PNG's own pixels. The sheet frame's DIRECT children are the sprites; nothing is repacked, so the layout stays the designer's. The manifest names what would make the sheet unsliceable — overlapping rects, sprites off the image, drawing that bleeds out of its cell, repeated names, coordinates that had to be rounded — and the file is re-read from disk afterwards to check the manifest describes it. Returns the rects, so the caller can wire an engine up without opening the file.
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_ui_atlas"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Export scale; the rects are in the scaled file's pixels | |
| nodeId | No | The sheet frame whose direct children are the sprites; defaults to the single selected node | |
| outDir | No | Where the PNG and the manifest go; defaults to a temp directory | |
| 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. |