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
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Operations, applied in order | |
| dryRun | No | TRUE (default): resolve and fingerprint only. FALSE: apply in one transaction. | |
| planId | No | The planId returned by figma_batch_edit; if supplied on apply, a different op list is refused. | |
| fileKey | No | Which 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. | |
| stopOnError | No | TRUE: any failed op rolls back the whole batch. FALSE: continue and report partial success. | |
| expectedFingerprints | No | Map of nodeId -> fingerprint from the dry run. Apply refuses if any target moved since. |