Skip to main content
Glama

Batch edits

figma_batch
Idempotent

Several edits in ONE call and ONE undo step — a polish pass over what you built: fills, strokes, radius, effects, auto-layout, sizes, text, constraints, names.

Instructions

Several edits in ONE call and ONE undo step — a polish pass over what you built: fills, strokes, radius, effects, auto-layout, sizes, text, constraints, names. steps is a JSON array of { "op": "set_fills", "params": { … } } (tool names without figma_, 1–50), each checked against that tool's own parameters before anything runs. Modify and style edits only: no creates (figma_create_from_spec builds), no deletes, nothing that replaces nodes with new ids (group, boolean, flatten, clone). Steps run in order and stop at the first failure without rolling back: the error's partial.steps and partial.failedAt say what was applied, and one Ctrl+Z undoes the whole batch. Success: { steps: [{ index, op, ok, result }], completed, itemsFailed? }. A step's ok means it ran; each node it could not change is listed in itemsFailed: [{ step, op, id, error }]. Keyframe steps pass the same motion gate as figma_set_keyframes (BRIDGE_PROCESS).

Input Schema

NameRequiredDescriptionDefault
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
stepsYesJSON array, e.g. [{"op":"set_corner_radius","params":{"nodeIds":["1:2"],"radius":12}},{"op":"set_opacity","params":{"nodeIds":["1:3"],"opacity":0.6}}].
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond annotations: steps run in order, stop at first failure without rollback, partial.steps and partial.failedAt report what was applied, one Ctrl+Z undoes the batch, success returns { steps, completed, itemsFailed? }, and per-node failures are listed in itemsFailed. It also discloses validation against each target tool's parameters and the keyframe motion gate.

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 core value proposition and then supplies dense operational detail. It is longer than typical, but most sentences add distinct, useful information about batching, failure behavior, undo, and validation.

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 complex batch mutation tool with no output schema, the description covers purpose, exclusions, failure semantics, success shape, undo behavior, and validation. It does not elaborate on `force`, `session`, or `idempotencyKey`, but those are fully documented in the schema.

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 schema already documents all four parameters. The description nevertheless adds meaningful semantics for `steps`: it is a JSON array of op/params objects, tool names omit the figma_ prefix, batch size is 1–50, each step is validated against its target tool, and keyframe steps obey the motion gate. Other parameters are left to 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 specific verb, resource, and scope: several edits in one call and one undo step, covering fills, strokes, radius, effects, auto-layout, sizes, text, constraints, and names. It clearly distinguishes itself from create, delete, group/boolean/flatten/clone operations, so an agent can tell exactly what it is for.

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?

Explicitly describes when to use it (polish pass / batch modifications) and what it excludes: no creates, no deletes, no node-replacing operations. It names figma_create_from_spec as the alternative for builds, but does not explicitly compare batch usage against calling individual setter tools.

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

Deploy Server

Other Tools