Update nodes
update_nodesModify existing Figma node properties in one undo step: geometry, text, fills, strokes, effects, auto layout, styles, variables, and re-parenting via parentId.
Instructions
Change properties of existing nodes (one undo step). Also move nodes: props.parentId (+ optional props.index) re-parents. PROPS (all optional):
Geometry: name, x, y, width, height, rotation, opacity, visible, locked, constraints, blendMode.
fills / strokes: array of "#RRGGBB" | "#RRGGBBAA" | "rgba(r,g,b,a)" | {type:"SOLID", color, opacity?, variable?} | {type:"GRADIENT_LINEAR"|"GRADIENT_RADIAL"|"GRADIENT_ANGULAR"|"GRADIENT_DIAMOND", stops:[{color, position}] or ["#hex", ...], angle? (linear only, degrees: 0 = left→right, 90 = top→bottom)} | {type:"IMAGE", imagePath (local file) | imageUrl | imageBase64, scaleMode?: "FILL"|"FIT"|"CROP"|"TILE"}. [] removes all. Shorthand: fill / stroke = single paint.
strokeWeight, strokeAlign ("INSIDE"|"OUTSIDE"|"CENTER"), dashPattern, cornerRadius (number or [tl,tr,br,bl]).
effects: [{type:"DROP_SHADOW"|"INNER_SHADOW", color, offset:{x,y}, radius, spread?} | {type:"LAYER_BLUR"|"BACKGROUND_BLUR", radius}].
Auto layout (FRAME/COMPONENT): layoutMode ("HORIZONTAL"|"VERTICAL"|"GRID"|"NONE"), itemSpacing, padding (number | [vertical, horizontal] | [top,right,bottom,left] | {top,right,bottom,left}), primaryAxisAlignItems ("MIN"|"CENTER"|"MAX"|"SPACE_BETWEEN"), counterAxisAlignItems ("MIN"|"CENTER"|"MAX"|"BASELINE"), layoutWrap ("WRAP"|"NO_WRAP"), counterAxisSpacing, clipsContent.
Inside an auto-layout parent: layoutSizingHorizontal / layoutSizingVertical ("FIXED"|"HUG"|"FILL"), layoutPositioning ("ABSOLUTE"), layoutGrow.
TEXT: characters, fontFamily, fontStyle ("Bold", "Medium Italic"…), fontWeight (100-900), fontSize, lineHeight (px | "150%" | "auto"), letterSpacing (px | "2%"), textAlignHorizontal ("LEFT"|"CENTER"|"RIGHT"|"JUSTIFIED"), textAlignVertical, textAutoResize ("WIDTH_AND_HEIGHT"|"HEIGHT"|"NONE"|"TRUNCATE"), textCase, textDecoration, paragraphSpacing, hyperlink (url). Fonts are loaded automatically. Partial styling: rangeStyles [{text: "substring" | start, end, fontFamily?, fontStyle?, fontWeight?, fontSize?, fills?, textDecoration?, textCase?, letterSpacing?, lineHeight?, hyperlink?, textStyleId?, fillStyleId?}] (applied after characters).
Styles: fillStyleId / strokeStyleId / effectStyleId / textStyleId / gridStyleId — style id or exact local style name.
Variables: boundVariables {field: variableId | variable name | null}, fields e.g. fills, strokes, width, height, itemSpacing, paddingLeft, cornerRadius, opacity, characters.
INSTANCE: componentProperties {propName: value} (names without the #id suffix are fine), swapComponentId.
Any other writable Plugin API property is assigned as-is; problems are reported in "warnings" instead of failing the whole call.
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": {
"updates": "<updates>"
},
"name": "update_nodes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updates | Yes |