Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_batch_edit

Apply multiple text, style, layout, and structure edits to many Figma nodes in one undo transaction, using a dry run to resolve targets and verify changes before committing.

Instructions

Apply many small edits to many targets in ONE undo transaction, after resolving every target, font, style and component property in a dry run. Targets are nodeId or stable key; a key is the better identity because it survives node re-creation. Ops: set_text, set_name/rename, set_fill, set_stroke, resize, move, set_visible, set_opacity, set_rotation, set_layout, set_variant, set_constraints, duplicate, reparent. duplicate and reparent accept a destination parentId or parentKey; the key is resolved on the current page. dryRun defaults to TRUE and returns per-op plans plus a fingerprint per target and per non-page destination; apply with dryRun:false and the same expectedFingerprints. A reparent index is the final child index; omitted appends. A same-parent reorder keeps layoutPositioning unchanged. A failed op rolls the whole batch back unless stopOnError:false, which reports partial success and exactly which op failed.

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": {
      "ops": "<ops>"
    },
    "name": "figma_batch_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYesOperations, applied in order
dryRunNoTRUE (default): resolve and fingerprint only. FALSE: apply in one transaction.
planIdNoThe planId returned by figma_batch_edit; if supplied on apply, a different op list is refused.
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.
stopOnErrorNoTRUE: any failed op rolls back the whole batch. FALSE: continue and report partial success.
expectedFingerprintsNoMap of nodeId -> fingerprint from the dry run. Apply refuses if any target moved since.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.6/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 it well: single undo transaction, whole-batch rollback on any failed op unless stopOnError:false, partial-success reporting, and apply-time refusal if fingerprints are stale. These are exactly the mutation-safety facts an agent cannot infer from the schema.

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 transaction guarantee and dry-run requirement, then drills into identity, destinations, and failure behavior in descending order of importance. The inline list of fifteen op names partly duplicates the schema's enum-like union, and the dryRun default is restated, but neither is wasted space for a tool this dense.

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, high-blast-radius mutation tool with no annotations and no output schema, the description covers atomicity, rollback, staleness protection, identity strategy, destination resolution, and failure reporting. An agent can construct a correct call sequence from it without guessing.

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 the baseline is 3; the description earns above that by explaining semantics the schema does not — why key beats nodeId, that parentKey resolves on the current page, that a reparent index is the final child index with append as default, and that same-parent reorders leave layoutPositioning alone. Some of this overlaps existing schema descriptions of dryRun and index, keeping it below a 5.

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?

Opens with a specific verb and scope: 'Apply many small edits to many targets in ONE undo transaction', which precisely frames this as a batched mutation primitive rather than a read or single-node edit. The enumeration of supported ops removes ambiguity about what 'edit' covers.

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?

Gives an explicit two-phase workflow — resolve/fingerprint in dry run first, then apply with dryRun:false plus the same expectedFingerprints — and states a preference for stable keys over nodeId with the reason (survives node re-creation). It stops short of naming when to prefer this tool over a sibling, so no exclusions or alternatives are stated.

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