Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_export_build_spec

Exports a live Figma subtree as a figma_build spec, preserving styles, variables, layout and text details while flagging unsupported nodes and fallbacks for accurate rebuilds.

Instructions

Turn a live subtree into a figma_build spec. Keys that are already stored are kept; nodes without one get the same derived key the build engine would choose. Fills, strokes and effects use styles or variables when the node is linked to them, and plain values otherwise; rotation, per-corner radii, stroke shape, layout grids, LINE length and text formatting are carried. A BOOLEAN_OPERATION is exported as a live boolean with its operation and ordered operands, not as a flattened SVG. A PATTERN paint carries its file-local source node id and tiling fields; a SHADER paint carries its shader id and property assignments. A node the build cannot express — an unsupported type, a frame created from SVG, a detached instance — is exported as an inline SVG render when svgFallback is on (the default): its appearance survives, but the rebuild is a flattened frame with no original child layers, component identity, overrides, style or variable links and with text outlined, and every fallback is named in warnings. Slices are never flattened. The reply is deliberately lossy and says where: mixed fonts and unrepresentable paints are listed under unsupported/warnings, and direct instance overrides travel as paths plus the fields a rebuild can express while unsupported override fields are named. Read-only; never modifies the file. A truncated export is marked truncated and must not be built as-is.

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_build_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdNoSubtree root; defaults to the single selected node
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.
maxDepthNoStop below this depth; skipped nodes are reported
maxNodesNoStop after this many nodes; sets truncated
svgFallbackNoExport a node with no build-spec equivalent as its inline SVG render; the rebuild is flattened
includeHiddenNoInclude hidden layers in the spec

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so thoroughly: it discloses that the reply is deliberately lossy and where, that fallback nodes are flattened with outlined text, no component identity or overrides, and are named in warnings, that slices are never flattened, and that truncation is flagged. It also states the operation is read-only and never modifies the file, covering the safety profile an annotation would normally provide.

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?

It is front-loaded with the core purpose and every sentence contributes behavior (boolean operations, PATTERN and SHADER paints, fallback rules, lossiness reporting). The downside is density: it is delivered as one long block without structural breaks, which makes the most decision-relevant clause about truncation easy to miss at the end.

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

Completeness5/5

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

For a complex, lossy export tool with six parameters, no annotations and no output schema, the description covers what is preserved, what is degraded and how degradation is surfaced (unsupported/warnings, truncated flag). Nothing an agent needs in order to decide to call it and interpret the result appears to be missing.

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

Parameters4/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 six parameters and the baseline is 3. The description adds real meaning on top by explaining what happens for the svgFallback case (flattened rebuild, text outlined, warnings emitted) and by describing key-derivation rules for nodes lacking a stored key, though it says nothing extra about nodeId, fileKey, maxDepth or includeHidden beyond the schema.

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

Purpose5/5

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

States a concrete verb and resource ('Turn a live subtree into a figma_build spec') and names the counterpart tool figma_build, so an agent knows both what it produces and who consumes it. It goes on to enumerate what is carried (fills, strokes, effects, rotation, per-corner radii, layout grids, LINE length, text formatting), which separates it from generic export siblings.

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 description explains that the output feeds figma_build and warns that a truncated export must not be built as-is, which is actionable usage context. However, it never says when to pick this over the other export siblings (figma_export_9slice, figma_export_ui_atlas, figma_export_web_handoff) or what the prerequisite connected-file situation implies beyond the schema's fileKey note.

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