Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_tokens

Export, diff, or import Figma file variables as design-token JSON, with dry-run planning and guarded writes to keep design tokens in sync.

Instructions

Export, diff or sync the file's local variables as a design-token document. "export" writes figma-tokens/v1 with every collection, mode, value, description and alias; "diff" compares a document with the live file; "import" (dry run by default) creates missing collections, modes and variables, updates values/descriptions, and verifies every mode after writing. A plain DTCG tree is accepted on import with collection/mode (default Tokens / Mode 1); supported types are color, number, dimension (px is dropped into a unitless FLOAT), string, boolean, fontFamily and fontWeight. Unsupported DTCG types block the import instead of being dropped. Import is one undo transaction and requires the fingerprint from a dry run plus the planId; a changed file or changed live variables is refused before writing. A remote/library alias carries remote:true and its live variable id; only an unchanged binding is preserved, never rebound by name. prune is off by default and, when enabled, deletes only variables in the named collections and only with allowDestructive:true; aliases pointing at a pruned variable block the plan. Modes that the document does not name are preserved for existing variables and filled from the default managed mode for new variables, with that fact in the plan.

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": {
      "path": "<path>"
    },
    "name": "figma_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoPlain DTCG import: destination mode name (default Mode 1)
pathYesexport: destination JSON; diff/import: the token document to read
pruneNoImport: delete variables absent from the document in the named collections. Off by default.
actionNoexport: write the live variables to path | diff: compare path with live | import: dry run or apply pathexport
dryRunNoImport: TRUE (default) plans and fingerprints; FALSE applies.
planIdNoImport apply: the planId returned by the dry run; required when dryRun:false.
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.
collectionNoPlain DTCG import: destination collection name (default Tokens)
maxChangesNoMaximum changes listed in the reply; counts stay complete and truncation is reported.
allowDestructiveNoImport + prune: confirms variable deletion. Node bindings to deleted variables will break.
expectedFingerprintNoImport apply: the fingerprint returned by the dry run; required when dryRun:false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4/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 output document format (figma-tokens/v1), supported DTCG types and the px-to-unitless-FLOAT conversion, that unsupported types block the import, that import is a single undo transaction, prune/allowDestructive safety limits, and how aliases and unnamed modes are handled. The remaining gap is that it does not spell out the return payload of diff (only that changes are capped by maxChanges), but the mutation and refusal semantics are unusually well documented.

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?

The definition is front-loaded with the three actions first and then drills into import safety rules, with no filler or repetition. It is dense and long, and a few sentences pack several distinct rules together, but for an 11-parameter, multi-action tool the length is largely justified.

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?

Given a complex multi-action tool with no annotations and no output schema, the description covers the important behaviors: the export document shape, import preconditions, refusal conditions, prune safety and mode preservation. It stops short of describing what the diff reply contains beyond truncation, which is the main missing piece for an agent acting blind on outputs.

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 coverage is 100%, so a baseline of 3 applies; the description still adds real meaning by tying planId and expectedFingerprint together as dry-run outputs, explaining the prune/allowDestructive relationship, the meaning of collection/mode defaults for plain DTCG input, and how maxChanges truncates the reply. It does not clarify every parameter individually (e.g. fileKey resolution rules appear only in the schema), hence not a 5.

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 first sentence gives a specific verb set and resource: export, diff or sync the file's local variables as a design-token document, and each action is then defined in-line. It is clear what the tool does, but it never contrasts itself with the obvious sibling figma_get_variable_defs, so an agent must infer which one is the read-only path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It tells the agent exactly when each action applies (export writes the document, diff compares, import plans by default with dryRun true) and the preconditions for applying (fingerprint plus planId, refusal on a changed file or changed live variables). It does not name alternative tools for simple variable reading.

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