Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_export_ui_states

Exports a component's UI states as separate files with a manifest, and flags identical state files so accidental hover or active duplicates are caught.

Instructions

Export the states of a button/component as one file per state, plus a manifest naming them. A COMPONENT_SET names its variants by property (the only property, or the one you pass as property); a frame names them by layer name. States with identical bytes are reported — a hover that draws exactly like normal is usually a bug, though it can be deliberate. Every file is re-read from disk: its size is checked against the node and its hash recorded.

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

Input Schema

NameRequiredDescriptionDefault
scaleNoPNG scale; files are named @2x, @3x … when it is not 1
formatNoSVG for icons (the file carries width/height), PNG otherwisePNG
nodeIdNoA component set or a frame whose children are the states; defaults to the single selected node
outDirNoWhere the files 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.
propertyNoWhich variant property names the states, when the set declares several

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does meaningful work: it discloses that files are written to disk, re-read, size-checked against the node, and hash-recorded, and that byte-identical states are flagged. It still omits whether the operation is destructive to an existing outDir, what happens on partial failure, and any permission or rate-limit constraints for a tool that writes many files.

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?

Four sentences, front-loaded with the output contract before the node-resolution rules and the duplicate-bytes caveat. The aside that a hover identical to normal is 'usually a bug, though it can be deliberate' is slightly discursive but is genuinely decision-relevant, so little is wasted.

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?

For a six-parameter tool with no annotations and no output schema, the description covers the produced artifacts and the on-disk verification behavior reasonably well. It does not describe the manifest's shape, where the recorded hashes live, or what the tool returns to the caller, which leaves a real gap given the absence of an output schema.

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 every parameter is already documented, and the description's notes on `property` and `nodeId` largely restate the schema. It adds modest conceptual value by explaining how variant property names map to file names, but supplies no format, default, or constraint detail beyond the schema — the baseline 3 applies.

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?

The description opens with a specific verb and resource — 'Export the states of a button/component as one file per state, plus a manifest naming them' — which tells an agent exactly what artifact it produces. It does not, however, name or distinguish itself from plausible siblings like figma_download_assets or figma_export_ui_atlas, so the agent must infer the boundary.

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?

Usage is implied through the source-node rules: a COMPONENT_SET is named by variant property, a frame by layer name, and `property` disambiguates multi-property sets. There is no explicit when-to-use guidance, no statement of prerequisites (connected file), and no routing to or away from sibling export tools, leaving the agent to infer selection.

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