figma-edit-mcp
v2.3.3Programmatically read, create, and modify Figma designs via MCP.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
page_info Get Pages
List the document's pages; no args → all pages (no children), or pass `pageIds` → those pages with their top-level children. Batch ≤25 ids/call. Inspect `coverage`: a failed page is omitted with a structured `pageErrors` row while other pages still return.
| Parameter | Type | Description |
|---|---|---|
pageIds | array | Array of page IDs to inspect |
node_info Get Node Info
Read one or more nodes — recursive subtree traversal with `properties` selection, `filter`, and `maxDepth`. Returns only the requested properties (incl. resolved `boundVariables`/`explicitVariableModes`) under each node's `properties` key. A node whose containing page could not be read is listed in `pageFailedNodes` with that page's ID, and the page's structured reason is in `coverage.pageErrors` — other pages still return normally. The workhorse read; start here before any write.
| Parameter | Type | Description |
|---|---|---|
concurrencyLimit | integer | Concurrency limit for parallel subtree walk (default: 4) |
filter | object | Optional filter criteria. |
maxDepth | integer | Maximum depth for recursive child traversal. 0 = self only, 1 = self and immediate children, etc. |
nodeIds | array | Array of node IDs to inspect. If empty, uses editable scope. |
properties | array | Array of property names to return (populates each node's `properties` object in the response). |
node_transform Transform Node
Move and/or resize a node by setting absolute `x`/`y`/`width`/`height` (any subset).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to transform |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
height | number | New height |
width | number | New width |
x | number | New X position |
y | number | New Y position |
node_rename Rename Node
Rename a node (sets `name` to an exact value).
| Parameter | Type | Description |
|---|---|---|
name * | string | New non-empty name for the node. Figma normalizes an empty name to a type default, so `""` is refused rather than silently substituted. |
nodeId * | string | The ID of the node to rename |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
node_delete Delete Nodes
Delete one or more nodes in a single batched, per-item-validated call. No API undo. If the status is 'partial_success', treat it as an incomplete operation, report the failed and skipped items to the user, and retry every non-success item (both failed and skipped).
| Parameter | Type | Description |
|---|---|---|
nodes * | array | Array of nodes to delete |
node_clone Clone Node
Duplicate an existing node, optionally at a new `x`/`y`. Produces a new node id.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to clone |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
x | number | New X position for the clone |
y | number | New Y position for the clone |
node_group Group Nodes
Wrap multiple nodes in a new group node.
| Parameter | Type | Description |
|---|---|---|
nodes * | array | Array of nodes to group |
name | string | Optional non-empty name for the new group. Omit to accept Figma's default; `""` is refused rather than silently substituted. |
node_ungroup Ungroup Node
Dissolve a group, promoting its children to the parent. Removes the group container.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the group to ungroup |
nodeName * | string | The group's current exact name, passed back verbatim from `node_info`. |
node_flatten Flatten Node
Flatten a node and its children into a single vector. Lossy — original structure is not recoverable.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to flatten |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
node_insert_child Reparent Node
Reparent a node under a new parent at an optional `index`. Valid range is 0 to parent's child count. Omit `index` to append.
| Parameter | Type | Description |
|---|---|---|
childId * | string | ID of the child node to reparent |
childNodeName * | string | The child node's current exact name, passed back verbatim from `node_info`. |
parentId * | string | ID of the new parent node |
parentNodeName * | string | The parent node's current exact name, passed back verbatim from `node_info`. |
index | number | Position in parent's children array (default: append). The output index reports the actual resolved position (same-parent reorder shifts indices). |
node_set_auto_layout Set Auto Layout
Configure a frame's auto-layout (mode, padding, spacing, alignment, sizing) in one unified setter.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the frame to modify |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
counterAxisAlignItems | string | Counter axis alignment (MIN/MAX = top/bottom in horizontal, left/right in vertical) |
counterAxisSpacing | number | Distance between wrapped rows/columns. Only works when layoutWrap is set to WRAP. |
itemSpacing | number | Distance between children. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN. |
layoutMode | string | Layout mode for the frame |
layoutSizingHorizontal | string | Horizontal sizing mode (HUG for frames/text only, FILL for auto-layout children only) |
layoutSizingVertical | string | Vertical sizing mode (HUG for frames/text only, FILL for auto-layout children only) |
layoutWrap | string | Whether the auto-layout frame wraps its children |
paddingBottom | number | Bottom padding value |
paddingLeft | number | Left padding value |
paddingRight | number | Right padding value |
paddingTop | number | Top padding value |
primaryAxisAlignItems | string | Primary axis alignment (MIN/MAX = left/right in horizontal, top/bottom in vertical). Note: When set to SPACE_BETWEEN, itemSpacing will be ignored as children will be evenly spaced. |
node_set_fill Set Fill
Set a node's fill to a literal RGBA color, an image, or clear it. Use `node_apply_style` to link a shared paint style, or `node_bind_variable` to bind a color token.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to modify |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
a | number | Alpha component (0-1) |
b | number | Blue component (0-1) |
clear | boolean | Set to true to clear all fills. Must provide exactly one of solid color, image, or clear:true. |
g | number | Green component (0-1) |
image | object | Optional image payload. Must provide exactly one of solid color or image. |
r | number | Red component (0-1) |
node_set_stroke Set Stroke
Set a node's stroke color and weight; supports uniform or per-side weights.
| Parameter | Type | Description |
|---|---|---|
b * | number | Blue component (0-1) |
g * | number | Green component (0-1) |
nodeId * | string | The ID of the node to modify |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
r * | number | Red component (0-1) |
a | number | Alpha component (0-1) |
strokeBottomWeight | number | Bottom side stroke weight |
strokeLeftWeight | number | Left side stroke weight |
strokeRightWeight | number | Right side stroke weight |
strokeTopWeight | number | Top side stroke weight |
weight | number | Uniform stroke weight (used when individual side weights are not provided) |
node_set_corner_radius Set Corner Radius
Set a node's corner radius — uniform or per-corner.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to modify |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
radius * | number | Corner radius value |
corners | array | Optional array of 4 booleans to specify which corners to round [topLeft, topRight, bottomRight, bottomLeft] |
node_set_effects Set Effects
Set a node's effect array (shadows, blurs). Use `node_apply_style` to link a shared effect style instead.
| Parameter | Type | Description |
|---|---|---|
effects * | array | Array of strict per-variant Figma effects: DROP_SHADOW/INNER_SHADOW or LAYER_BLUR/BACKGROUND_BLUR |
nodeId * | string | The ID of the node to modify |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
node_apply_style Apply Style
Link a node to a shared library style (paint/text/effect/grid) by `styleId`. Use the raw `node_set_*` setters for ad-hoc values not backed by a style.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to apply style to |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
styleId * | string | The ID of the style to apply |
styleType * | string | Type of style to apply (target property) |
node_bind_variable Bind Variable
Bind a variable to a node property, or set an explicit variable mode. Use instead of a literal `node_set_*` when the value should track a design token. Ordering rules: set auto-layout before binding padding/spacing; set a solid fill before binding a colour token.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to bind variables to |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
bindVariables | object | Map of property names to variable IDs (to bind) or null (to unbind). Valid fields: fills, strokes, height, width, characters, itemSpacing, paddingLeft, paddingRight, paddingTop, paddingBottom, visible… |
explicitVariableModes | object | Map of variable collection IDs to mode IDs. E.g., { 'VariableCollectionID:1:2': 'ModeID:1:3' } |
node_export_visual Export Node Image
Render a node to an image (PNG/JPG/SVG/PDF) at a given scale. Read-only; the canonical way to visually verify edits. SVG returns raw XML in `svg` (directly readable); PNG/JPG/PDF return base64 in `imageData` (PDF is a delivery artifact — prefer PNG/SVG for inspection).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to export |
format | string | Export format |
scale | number | Export scale, between 0.1 and 4.0 (e.g. 1, 2, 0.5) |
create_shape Create Shape
Create a rectangle, ellipse, polygon, or star via `type`, with position/size and optional `fillColor`/`strokeColor`. Shape-specific params (`arcData`; `pointCount`/`innerRadius`) validated by `type`. `pointCount` = sides (polygon) or points (star), native count — no even-parity rule.
| Parameter | Type | Description |
|---|---|---|
height * | number | Height of the shape |
parentId * | string | Parent node ID to append the shape to |
parentNodeName * | string | The parent node's current exact name, passed back verbatim from `node_info`. |
type * | string | The type of shape to create |
width * | number | Width of the shape |
x * | number | X position |
y * | number | Y position |
arcData | object | Optional arc data for creating arcs/donuts (ELLIPSE only) |
fillColor | object | Fill color in RGBA format |
innerRadius | number | 0.0–1.0, star sharpness (default: 1.0). STAR only. |
name | string | Optional non-empty name for the shape |
pointCount | number | Number of sides (polygon) or points (star), ≥3. Required for POLYGON and STAR. |
strokeColor | object | Stroke color in RGBA format |
useAbsolutePosition | boolean | If true and parent is an auto-layout frame, forces absolute positioning to prevent layout shifts. |
create_frame Create Frame
Create a frame (container) with optional fill/stroke and full auto-layout configuration.
| Parameter | Type | Description |
|---|---|---|
height * | number | Height of the frame |
parentId * | string | Parent node ID to append the frame to |
parentNodeName * | string | The parent node's current exact name, passed back verbatim from `node_info`. |
width * | number | Width of the frame |
x * | number | X position |
y * | number | Y position |
counterAxisAlignItems | string | Counter axis alignment for auto-layout frame |
fillColor | object | Fill color in RGBA format |
itemSpacing | number | Distance between children in auto-layout frame. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN. |
layoutMode | string | Auto-layout mode for the frame |
layoutSizingHorizontal | string | Horizontal sizing mode for auto-layout frame |
layoutSizingVertical | string | Vertical sizing mode for auto-layout frame |
layoutWrap | string | Whether the auto-layout frame wraps its children |
name | string | Optional non-empty name for the frame |
paddingBottom | number | Bottom padding for auto-layout frame |
paddingLeft | number | Left padding for auto-layout frame |
paddingRight | number | Right padding for auto-layout frame |
paddingTop | number | Top padding for auto-layout frame |
primaryAxisAlignItems | string | Primary axis alignment for auto-layout frame. Note: When set to SPACE_BETWEEN, itemSpacing will be ignored as children will be evenly spaced. |
strokeColor | object | Stroke color in RGBA format |
strokeWeight | number | Stroke weight |
create_text Create Text
Create a text node with content and optional font size/weight/color.
| Parameter | Type | Description |
|---|---|---|
parentId * | string | Parent node ID to append the text to |
parentNodeName * | string | The parent node's current exact name, passed back verbatim from `node_info`. |
text * | string | Text content |
x * | number | X position |
y * | number | Y position |
fontColor | object | Font color in RGBA format |
fontSize | number | Font size, minimum 1 (default: 14) |
fontWeight | integer | Font weight: 100–900 in increments of 100 (default: 400) |
name | string | Optional non-empty semantic layer name for the text node |
create_svg Create Node from SVG
Create a node from an SVG markup string.
| Parameter | Type | Description |
|---|---|---|
parentId * | string | Parent ID to append to |
parentNodeName * | string | The parent node's current exact name, passed back verbatim from `node_info`. |
svg * | string | The SVG XML string |
name | string | Optional non-empty name for the new node |
x | number | X position |
y | number | Y position |
create_component Create Component
Convert an existing frame into a main component.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the frame to convert to a component |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
create_instance Create Instance
Instantiate a component (by `componentKey` or `componentId`) at a position.
| Parameter | Type | Description |
|---|---|---|
parentId * | string | Parent node ID to append the instance to |
parentNodeName * | string | The parent node's current exact name, passed back verbatim from `node_info`. |
x * | number | X position |
y * | number | Y position |
componentId | string | Node ID of the component to instantiate (preferred for local components) |
componentKey | string | Key of the component to instantiate (for remote/library components) |
create_component_set Create Component Set
Combine components into a component set (variants) with property definitions.
| Parameter | Type | Description |
|---|---|---|
components * | array | Array of component objects |
parentId * | string | ID of the appendable parent container (frame, group, page, section, etc.) to place the set in; discover it with node_info |
parentNodeName * | string | The parent node's current exact name, passed back verbatim from `node_info`. |
properties * | array | Array of property names (e.g. ['Size', 'State']) |
componentSetName | string | Optional non-empty name for the component set |
style_list List Styles
List all local styles (paint/text/effect/grid) in the document.
style_manage Manage Style
Create a named style (paint/text/effect/grid), or update an existing one when `styleId` is given. UPDATE requires currentStyleName.
style_delete Delete Style
Delete a local style by id. Detaches consumers — they keep their resolved values and lose only the style link.
| Parameter | Type | Description |
|---|---|---|
styleId * | string | ID of style to delete |
styleName * | string | The style's current exact name, passed back verbatim from `style_list`. |
text_set_content Set Text Contents
Set the text of one or more text nodes in a single batched, per-item-validated call. If the status is 'partial_success', treat it as an incomplete operation, report the failed and skipped items to the user, and retry every non-success item (both failed and skipped).
| Parameter | Type | Description |
|---|---|---|
text * | array | Array of text objects |
text_set_style Set Text Style
Set any combination of typography properties (font, size, weight, spacing, decoration, …) on a text node.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the text node to modify |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
fontName | object | Font family and style |
fontSize | number | Font size |
letterSpacing | object | Letter spacing settings |
lineHeight | Line height settings | |
paragraphIndent | number | Paragraph indent in pixels |
paragraphSpacing | number | Paragraph spacing in pixels |
textAlignHorizontal | string | Horizontal text alignment |
textAlignVertical | string | Vertical text alignment |
textCase | string | Case transformation on the text |
textDecoration | string | Text decoration |
component_list List Components
List components in the document, with filtering and scope options. Document scans isolate page failures and report them in `coverage`; page-scoped failures return their structured error directly.
| Parameter | Type | Description |
|---|---|---|
filter | string | Filter components by origin: 'local' (created in this file) or 'remote' (library components). If omitted, returns all. |
pageId | string | The ID of the page to query when scope is 'page' |
scope | string | Scope of the search: 'page' (queries a specific page, requiring pageId) or 'document' (entire file, default). |
component_manage_property Manage Component Property
Add or edit a component-property definition (BOOLEAN/TEXT/INSTANCE_SWAP) on a main component or variant set. Deleting is `component_delete_property`.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
nodeId * | string | ID of the COMPONENT or COMPONENT_SET |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
propertyName * | string | For ADD, the required new property name, which must be non-empty. For EDIT, the existing property's exact lookup name. |
defaultValue | Required for ADD: Default value for the property. For INSTANCE_SWAP, this must be a component node ID. | |
newDefaultValue | For the EDIT action, to change the default value. For INSTANCE_SWAP, this must be a component node ID. | |
newPropertyName | string | For EDIT, the optional replacement property name. It must be non-empty when supplied; omit it to leave the existing property name unchanged. |
preferredValues | array | Array of preferred values for INSTANCE_SWAP properties during ADD or EDIT. |
propertyType | string | Required for ADD: The type of property |
component_delete_property Delete Component Property
Remove a component-property definition from a main component or variant set; propagates to every instance.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | ID of the COMPONENT or COMPONENT_SET |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
propertyName * | string | The human-readable name of the property to delete |
instance_set_property Set Instance Property
Set one property on an instance — boolean toggle, text override, instance swap, or variant selection.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the instance node |
nodeName * | string | The instance's current exact name, passed back verbatim from `node_info`. |
propertyName * | string | The human-readable name of the component property to change |
value * | The new value for the property. For INSTANCE_SWAP properties, this must be a component key (the stable library identifier). |
instance_get_overrides Get Instance Overrides
Read the override properties from a source instance, to later apply them to other instances.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the component instance to get overrides from. |
instance_set_overrides Set Instance Overrides
Apply previously-read overrides to target instances; targets are swapped to the source component and all overrides applied. If the status is 'partial_success', treat it as an incomplete operation, report the failed and skipped items to the user, and retry every non-success item (both failed and skipped).
| Parameter | Type | Description |
|---|---|---|
sourceInstanceId * | string | ID of the source component instance |
targetNodes * | array | Array of target instances with their expected names for verification. |
variable_list List Variables
List local variables/collections, or detailed info for specific variable ids; optionally scan for consumers. Document consumer scans isolate page failures and report them in `coverage`; page-scoped failures return their structured error directly.
| Parameter | Type | Description |
|---|---|---|
includeConsumers | string | Only used when variableId is provided; ignored otherwise. 'page' scans a specific page, requiring pageId. 'document' scans all pages (streams progress page-by-page). |
pageId | string | The page ID to scan for consumers when includeConsumers is 'page'. |
variableId | array | Optional array of variable IDs to retrieve detailed information for. If omitted, lists all local variables. |
variable_manage Manage Variables
Create collections and variables and set their values/aliases (create/update router). UPDATE_VARIABLE requires `currentVariableName`. CREATE_VARIABLE requires `collectionName` and `scopes`.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action type |
collectionId | string | Collection ID (for CREATE_VARIABLE) |
collectionName | string | REQUIRED for CREATE_VARIABLE — the parent collection's exact name, passed back verbatim from `variable_list` |
currentVariableName | string | REQUIRED for UPDATE_VARIABLE — the variable's **current exact** name, passed back verbatim from `variable_list` |
description | string | Description (for UPDATE_VARIABLE) |
modeId | string | Mode ID (for UPDATE_VARIABLE value setting) |
modeName | string | Optional initial mode name for CREATE_COLLECTION. Must be non-empty when supplied; omit it to keep the collection's native default mode name. |
name | string | Name for collection/variable creation or variable update. Must be non-empty when supplied. It is required for CREATE_COLLECTION and CREATE_VARIABLE; omit it only on UPDATE_VARIABLE to leave the curren… |
scopes | array | REQUIRED for CREATE_VARIABLE — variable scopes. ALWAYS set explicitly on create; omit on update to leave unchanged. |
type | string | Variable type (for CREATE_VARIABLE) |
value | Value for the variable (or alias) (for CREATE or UPDATE) | |
variableId | string | Variable ID (for UPDATE_VARIABLE) |
variable_delete Delete Variables
Delete specific variables or an entire collection. Runs a full-document consumer check first, before any removal: if a target is still in use the call is refused with VARIABLE_IN_USE, whose `details.variablesInUse` lists every consumer; if any page cannot be loaded and read it is refused with DOCUMENT_SCAN_INCOMPLETE, because a page error can never mean zero consumers.
| Parameter | Type | Description |
|---|---|---|
collectionId | string | ID of a variable collection to delete. Mutually exclusive with variableIds. |
collectionName | string | Name of the collection to delete, for safety verification. Required if collectionId is used. |
variableIds | array | Array of variable IDs to delete. Mutually exclusive with collectionId. |
variableNames | array | Array of variable names corresponding to variableIds, for safety verification. Required if variableIds is used. |
annotation_list List Annotations
Read the native annotations on a page or node (and subtree); exactly one of pageId or nodeId is required. The file's annotation categories are returned by default; pass includeCategories: false to omit them. Page loading is bounded; a page-scoped failure returns its structured error directly and successful reads include `coverage`.
| Parameter | Type | Description |
|---|---|---|
includeCategories | boolean | Include the file's global annotation categories in the result. Defaults to true; pass false to omit them. |
nodeId | string | The node ID to get annotations from. Exactly one of pageId or nodeId is required. |
pageId | string | The page ID to get annotations from. Exactly one of pageId or nodeId is required. |
annotation_set Set Annotations
Append native annotations to one or more nodes in a batched call. If the status is 'partial_success', treat it as an incomplete operation and report the failed and skipped items to the user. Appending is NOT idempotent and a 'failed' row may already have appended its annotation (verified counts differ, or outcomeUnknown is true when post-state is unreadable; both carry partialMutation: true) — before retrying any non-success item, call annotation_list and compare the labels already on the node, or you will create a duplicate.
| Parameter | Type | Description |
|---|---|---|
annotations * | array | Array of annotations to set |
reaction_list List Reactions
Read prototype reactions from one or more nodes and their descendants.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Array of node IDs to get reactions from |
reaction_update Update Reactions
Replace a node's prototype reactions with a full new reactions array (read first via `reaction_list`).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The ID of the node to update reactions for |
nodeName * | string | The node's current exact name, passed back verbatim from `node_info`. |
reactions * | array | The full array of Reaction objects to set |
channel_join Join Channel
Join a plugin channel to establish the live connection to the Figma document.
| Parameter | Type | Description |
|---|---|---|
channel * | string | The name of the channel to join |