Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_patch

Apply keyed updates to a Figma design tree in one undo transaction. Run a dry-run diff first to preview create, update, and delete counts before writing.

Instructions

Update an existing keyed tree by stable key, in ONE transaction. A dry run is a real diff: it reports create/update/delete counts and a scope fingerprint without writing. Missing keys are refused unless allowCreate:true; a key that lives under a different parent is refused rather than duplicated; prune:true deletes keyed children omitted from the patch at each patched level. An SVG leaf keeps its frame id and key while a changed svg source replaces its interior. A BOOLEAN_OPERATION patch may list only the operands it changes when prune is false; pruning a boolean requires at least two operands in the patch. A sparse boolean patch keeps the existing operand order and appends a new operand; send the complete ordered list with prune:true to enforce order. Text updates load their fonts before writing, and any failure rolls the whole patch back. Target with rootNodeId, buildId or rootKey.

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": {
      "patch": "<patch>"
    },
    "name": "figma_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
patchYesSparse tree: only supplied properties are applied. Children are matched by key.
pruneNoDelete keyed children omitted from the patch at each patched level
dryRunNoTRUE (default): diff only. FALSE: apply in one undo transaction.
planIdNo
buildIdNoThe buildId stored on the root
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.
rootKeyNoThe stable key stored on the root
rootNodeIdNoThe built root, by id
allowCreateNoCreate keys that are not present under the matched parent
expectedFingerprintNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A3.8/5.0
Behavior4/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 substantial work: it discloses that dry run is the default and returns create/update/delete counts plus a scope fingerprint, that application is a single undo transaction with full rollback on any failure (including font loading), and the exact refusal rules for missing keys, cross-parent keys and boolean pruning. Gaps remain around authentication/connection requirements and the role of planId and expectedFingerprint in concurrency control.

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 core action and the one-transaction guarantee are front-loaded, and subsequent sentences handle dry run, refusals, prune, SVG and boolean edge cases in a logical order. It is dense and long, with three sentences devoted to boolean operand ordering, but almost every sentence carries operational information an agent needs to avoid a failed patch.

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 deeply nested schema with 10 parameters, no annotations and no output schema, the description is unusually complete on write semantics, atomicity, refusal behaviour and the dry-run return shape. The main shortfall is that planId and expectedFingerprint — which look like idempotency and optimistic-concurrency controls — are left entirely to their bare schema entries.

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 80%, so the baseline is 3, but the description adds real meaning on top: allowCreate governs creation of absent keys, prune deletes omitted keyed children at each patched level, and the three root selectors are named as alternative targets. It also clarifies SVG leaf identity and the sparse-vs-complete boolean operand rule, which the schema does not express. planId and expectedFingerprint are never explained in prose, keeping it below 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?

States a specific verb, resource and mechanism: 'Update an existing keyed tree by stable key, in ONE transaction.' That is far more precise than a generic 'update' tool and makes the keyed-tree model explicit. It stops short of naming a sibling (e.g. figma_build for creation vs figma_batch_edit) so the boundary with neighbouring write tools is left implicit.

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 context is implied by 'update an existing keyed tree' and by the targeting sentence ('Target with rootNodeId, buildId or rootKey'), and the dryRun default of true signals a diff-first workflow. However there is no explicit when-to-use/when-not guidance and no named alternative for creating new trees or doing bulk unrelated edits, so routing between this and figma_build/figma_batch_edit must be inferred.

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