figma_update_node
Update a Figma node: change text, apply text/fill styles, adjust layout, toggle visibility, set position, reparent, or switch pages. Uses design system tokens when available.
Instructions
Mutates an existing Figma node or the editor's UI focus, dispatched by op. Ops: "text" (set text content), "text_style" (apply DS text style), "fill" (fillStyleId/fillVariable/raw fill), "layout" (sizing, padding, gap, alignment), "visibility" (show/hide), "position" (absolute x/y), "restyle" (artboard/frame fill+radius+stroke+padding+gap in one call), "move" (reparent via parentId+index), "select" (select+scroll into view), "page" (switch page by name/id). All ops except "select"/"page" require Phase 2 (DS discovered) and validate any *Variable path against the cached DS before sending. Use figma_delete_node (separate, destructive tool) to remove a node instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Absolute x position. op="position". | |
| y | No | Absolute y position. op="position". | |
| op | Yes | Which mutation to perform. | |
| fill | No | Raw color as hex string ("#3b36f2") or RGB object. op="fill" fallback when no DS styles/variables available. | |
| index | No | Insert index within the new parent. op="move". Omit for end. | |
| width | No | Fixed width. op="layout". | |
| height | No | Fixed height. op="layout". | |
| nodeId | No | Target node ID. Required for every op except "page". | |
| pageId | No | Page ID to switch to. op="page". Takes precedence over pageName. | |
| content | No | New text content. op="text". | |
| visible | No | True to show, false to hide. op="visibility". | |
| maxWidth | No | Max width constraint. op="layout". | |
| pageName | No | Page name to switch to. op="page". | |
| parentId | No | New parent node ID. op="move". | |
| fillStyleId | No | DS fill style key (from figma_list_ds). op="fill". Priority: fillStyleId → fillVariable → fill. | |
| gapVariable | No | DS variable for item spacing. op="layout" or "restyle". | |
| textStyleId | No | DS text style key. op="text_style". | |
| fillVariable | No | DS variable path for fill color. op="fill" or "restyle". | |
| strokeWeight | No | Stroke weight. op="restyle". | |
| strokeVariable | No | DS variable for stroke color. op="restyle". | |
| paddingVariable | No | DS variable for uniform padding. op="layout" or "restyle". | |
| paddingTopVariable | No | op="layout". | |
| paddingLeftVariable | No | op="layout". | |
| cornerRadiusVariable | No | DS variable for corner radius. op="restyle". | |
| layoutSizingVertical | No | op="layout". | |
| paddingRightVariable | No | op="layout". | |
| counterAxisAlignItems | No | op="layout". | |
| paddingBottomVariable | No | op="layout". | |
| primaryAxisAlignItems | No | op="layout". | |
| layoutSizingHorizontal | No | op="layout". |