Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

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

NameRequiredDescriptionDefault
scaleNoExport scale; the rects are in the scaled file's pixels
nodeIdNoThe sheet frame whose direct children are the sprites; defaults to the single selected node
outDirNoWhere the PNG and the manifest go; defaults to a temp directory
fileKeyNoWhich 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the two output artifacts, that rects are in the PNG's own pixels, that direct children only are treated as sprites, the exact anomaly classes flagged in the manifest, and that the file is re-read from disk to validate the manifest. It omits whether files in outDir are overwritten and what happens on failure.

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

Conciseness4/5

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

Front-loaded with the deliverable, then behavior, then return value. Dense but nearly every clause carries information; the em-dash anomaly list is long but justified since it defines what the manifest reports.

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

Completeness4/5

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

For a no-annotation, no-output-schema export tool, the description covers artifacts, coordinate frame, selection semantics, validation, and return value. Remaining gaps are overwrite behavior and error signaling, which are minor for this tool's complexity.

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 coverage is 100%, so every parameter is already documented, making 3 the baseline. The description reinforces nodeId semantics (direct children are sprites) and the pixel-frame relationship between scale and rects, but adds little syntax or edge-case detail beyond the schema.

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 concrete verb and artifact: 'Export a sprite sheet for a game build: ONE PNG plus a JSON manifest'. The sprite-sheet framing distinguishes it from the UI-states, 9-slice, and web-handoff siblings, though it never names those siblings explicitly.

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?

The 'for a game build' framing implies the use case, and the note that nothing is repacked tells the agent what this tool will not do. But there is no explicit when-to-use versus the other figma_export_* tools, and no stated prerequisites before calling.

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