Skip to content

Creation

Tools for creating shapes, frames, and text nodes

5 tools in this domain.

create

Create section nodes to organize content on the canvas. Default: no fill (transparent).

ParameterTypeRequiredDescription
itemsobject[]Array of sections to create
namestringName (default: 'Section')
xnumberX position (default: 0)
ynumberY position (default: 0)
widthnumberWidth (default: 500)
heightnumberHeight (default: 500)
parentIdstringParent node ID. Omit to place on current page.
fillColorobjectFill color. Default: no fill (transparent).
rnumber
gnumber
bnumber
anumber
fillStyleNamestringApply a fill paint style by name (case-insensitive).
fillVariableIdstringBind a color variable to the fill.
depthnumberResponse detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.
JSON Schema
{
  "type": "object",
  "properties": {
    "items": {
      "description": "Array of sections to create",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "description": "Name (default: 'Section')",
            "type": "string"
          },
          "x": {
            "description": "X position (default: 0)",
            "type": "number"
          },
          "y": {
            "description": "Y position (default: 0)",
            "type": "number"
          },
          "width": {
            "description": "Width (default: 500)",
            "type": "number"
          },
          "height": {
            "description": "Height (default: 500)",
            "type": "number"
          },
          "parentId": {
            "description": "Parent node ID. Omit to place on current page.",
            "type": "string"
          },
          "fillColor": {
            "description": "Fill color. Default: no fill (transparent).",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "g": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "b": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "a": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "r",
              "g",
              "b"
            ]
          },
          "fillStyleName": {
            "description": "Apply a fill paint style by name (case-insensitive).",
            "type": "string"
          },
          "fillVariableId": {
            "description": "Bind a color variable to the fill.",
            "type": "string"
          }
        }
      }
    },
    "depth": {
      "description": "Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.",
      "type": "number"
    }
  },
  "required": [
    "items"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
results(success | error)[]Per-item results.
idstringNode ID
errorstringError message for this item
warningsstring[]Deduplicated warnings hoisted from individual results
Example response
{
  "results": [
    {
      "id": "10:4"
    }
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "Per-item results.",
      "items": {
        "oneOf": [
          {
            "title": "success",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Node ID"
              }
            }
          },
          {
            "title": "error",
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Error message for this item"
              }
            },
            "required": [
              "error"
            ]
          }
        ]
      }
    },
    "warnings": {
      "type": "array",
      "description": "Deduplicated warnings hoisted from individual results",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "results"
  ]
}
create

Create nodes from SVG strings.

ParameterTypeRequiredDescription
itemsobject[]Array of SVG items to create
svgstringSVG markup string
namestringLayer name (default: 'SVG')
xnumberX position (default: 0)
ynumberY position (default: 0)
parentIdstringParent node ID. Omit to place on current page.
depthnumberResponse detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.
JSON Schema
{
  "type": "object",
  "properties": {
    "items": {
      "description": "Array of SVG items to create",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "svg": {
            "type": "string",
            "description": "SVG markup string"
          },
          "name": {
            "description": "Layer name (default: 'SVG')",
            "type": "string"
          },
          "x": {
            "description": "X position (default: 0)",
            "type": "number"
          },
          "y": {
            "description": "Y position (default: 0)",
            "type": "number"
          },
          "parentId": {
            "description": "Parent node ID. Omit to place on current page.",
            "type": "string"
          }
        },
        "required": [
          "svg"
        ]
      }
    },
    "depth": {
      "description": "Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.",
      "type": "number"
    }
  },
  "required": [
    "items"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
results("ok" | error)[]Per-item results.
errorstringError message for this item
warningsstring[]Deduplicated warnings hoisted from individual results
Example response
{
  "results": [
    "ok"
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "Per-item results.",
      "items": {
        "oneOf": [
          {
            "type": "string",
            "const": "ok"
          },
          {
            "title": "error",
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Error message for this item"
              }
            },
            "required": [
              "error"
            ]
          }
        ]
      }
    },
    "warnings": {
      "type": "array",
      "description": "Deduplicated warnings hoisted from individual results",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "results"
  ]
}
create

Create frames in Figma. Batch supported. Use fillStyleName/fillVariableId and strokeStyleName/strokeVariableId instead of hardcoded colors — hardcoded values skip design tokens and will trigger lint warnings.

ParameterTypeRequiredDescription
itemsobject[]Array of frames to create
namestringFrame name (default: 'Frame')
xnumberX position (default: 0)
ynumberY position (default: 0)
widthnumberWidth (default: 100)
heightnumberHeight (default: 100)
parentIdstringParent node ID. Omit to place on current page.
fillColorobjectFill color. Default: no fill.
rnumber
gnumber
bnumber
anumber
strokeColorobjectStroke color. Default: none.
rnumber
gnumber
bnumber
anumber
strokeWeightnumberStroke weight (default: 1)
cornerRadiusnumberCorner radius (default: 0)
layoutMode"NONE" | "HORIZONTAL" | "VERTICAL"Auto-layout direction (default: NONE)
layoutWrap"NO_WRAP" | "WRAP"Wrap (default: NO_WRAP)
paddingTopnumberTop padding (default: 0)
paddingRightnumberRight padding (default: 0)
paddingBottomnumberBottom padding (default: 0)
paddingLeftnumberLeft padding (default: 0)
primaryAxisAlignItems"MIN" | "MAX" | "CENTER" | "SPACE_BETWEEN"
counterAxisAlignItems"MIN" | "MAX" | "CENTER" | "BASELINE"
layoutSizingHorizontal"FIXED" | "HUG" | "FILL"
layoutSizingVertical"FIXED" | "HUG" | "FILL"
itemSpacingnumberSpacing between children (default: 0)
fillStyleNamestringApply a fill paint style by name (case-insensitive). Omit to skip.
strokeStyleNamestringApply a stroke paint style by name. Omit to skip.
fillVariableIdstringBind a color variable to the fill. Creates a solid fill and binds the variable to fills/0/color.
strokeVariableIdstringBind a color variable to the stroke. Creates a solid stroke and binds the variable to strokes/0/color.
depthnumberResponse detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.
JSON Schema
{
  "type": "object",
  "properties": {
    "items": {
      "description": "Array of frames to create",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "description": "Frame name (default: 'Frame')",
            "type": "string"
          },
          "x": {
            "description": "X position (default: 0)",
            "type": "number"
          },
          "y": {
            "description": "Y position (default: 0)",
            "type": "number"
          },
          "width": {
            "description": "Width (default: 100)",
            "type": "number"
          },
          "height": {
            "description": "Height (default: 100)",
            "type": "number"
          },
          "parentId": {
            "description": "Parent node ID. Omit to place on current page.",
            "type": "string"
          },
          "fillColor": {
            "description": "Fill color. Default: no fill.",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "g": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "b": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "a": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "r",
              "g",
              "b"
            ]
          },
          "strokeColor": {
            "description": "Stroke color. Default: none.",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "g": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "b": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "a": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "r",
              "g",
              "b"
            ]
          },
          "strokeWeight": {
            "description": "Stroke weight (default: 1)",
            "type": "number",
            "exclusiveMinimum": 0
          },
          "cornerRadius": {
            "description": "Corner radius (default: 0)",
            "type": "number",
            "minimum": 0
          },
          "layoutMode": {
            "description": "Auto-layout direction (default: NONE)",
            "type": "string",
            "enum": [
              "NONE",
              "HORIZONTAL",
              "VERTICAL"
            ]
          },
          "layoutWrap": {
            "description": "Wrap (default: NO_WRAP)",
            "type": "string",
            "enum": [
              "NO_WRAP",
              "WRAP"
            ]
          },
          "paddingTop": {
            "description": "Top padding (default: 0)",
            "type": "number"
          },
          "paddingRight": {
            "description": "Right padding (default: 0)",
            "type": "number"
          },
          "paddingBottom": {
            "description": "Bottom padding (default: 0)",
            "type": "number"
          },
          "paddingLeft": {
            "description": "Left padding (default: 0)",
            "type": "number"
          },
          "primaryAxisAlignItems": {
            "type": "string",
            "enum": [
              "MIN",
              "MAX",
              "CENTER",
              "SPACE_BETWEEN"
            ]
          },
          "counterAxisAlignItems": {
            "type": "string",
            "enum": [
              "MIN",
              "MAX",
              "CENTER",
              "BASELINE"
            ]
          },
          "layoutSizingHorizontal": {
            "type": "string",
            "enum": [
              "FIXED",
              "HUG",
              "FILL"
            ]
          },
          "layoutSizingVertical": {
            "type": "string",
            "enum": [
              "FIXED",
              "HUG",
              "FILL"
            ]
          },
          "itemSpacing": {
            "description": "Spacing between children (default: 0)",
            "type": "number"
          },
          "fillStyleName": {
            "description": "Apply a fill paint style by name (case-insensitive). Omit to skip.",
            "type": "string"
          },
          "strokeStyleName": {
            "description": "Apply a stroke paint style by name. Omit to skip.",
            "type": "string"
          },
          "fillVariableId": {
            "description": "Bind a color variable to the fill. Creates a solid fill and binds the variable to fills/0/color.",
            "type": "string"
          },
          "strokeVariableId": {
            "description": "Bind a color variable to the stroke. Creates a solid stroke and binds the variable to strokes/0/color.",
            "type": "string"
          }
        }
      }
    },
    "depth": {
      "description": "Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.",
      "type": "number"
    }
  },
  "required": [
    "items"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
results(success | error)[]Per-item results.
idstringNode ID
errorstringError message for this item
warningsstring[]Deduplicated warnings hoisted from individual results
Example response
{
  "results": [
    {
      "id": "10:7"
    }
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "Per-item results.",
      "items": {
        "oneOf": [
          {
            "title": "success",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Node ID"
              }
            }
          },
          {
            "title": "error",
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Error message for this item"
              }
            },
            "required": [
              "error"
            ]
          }
        ]
      }
    },
    "warnings": {
      "type": "array",
      "description": "Deduplicated warnings hoisted from individual results",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "results"
  ]
}
create

Wrap existing nodes in an auto-layout frame. One call replaces create_frame + update_frame + insert_child × N.

ParameterTypeRequiredDescription
itemsobject[]Array of auto-layout wraps to perform
nodeIdsstring[]Array of node IDs to wrap
namestringFrame name (default: 'Auto Layout')
layoutMode"HORIZONTAL" | "VERTICAL"Direction (default: VERTICAL)
itemSpacingnumberSpacing between children (default: 0)
paddingTopnumberTop padding (default: 0)
paddingRightnumberRight padding (default: 0)
paddingBottomnumberBottom padding (default: 0)
paddingLeftnumberLeft padding (default: 0)
primaryAxisAlignItems"MIN" | "MAX" | "CENTER" | "SPACE_BETWEEN"
counterAxisAlignItems"MIN" | "MAX" | "CENTER" | "BASELINE"
layoutSizingHorizontal"FIXED" | "HUG" | "FILL"
layoutSizingVertical"FIXED" | "HUG" | "FILL"
layoutWrap"NO_WRAP" | "WRAP"
depthnumberResponse detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.
JSON Schema
{
  "type": "object",
  "properties": {
    "items": {
      "description": "Array of auto-layout wraps to perform",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "nodeIds": {
            "description": "Array of node IDs to wrap",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "description": "Frame name (default: 'Auto Layout')",
            "type": "string"
          },
          "layoutMode": {
            "description": "Direction (default: VERTICAL)",
            "type": "string",
            "enum": [
              "HORIZONTAL",
              "VERTICAL"
            ]
          },
          "itemSpacing": {
            "description": "Spacing between children (default: 0)",
            "type": "number"
          },
          "paddingTop": {
            "description": "Top padding (default: 0)",
            "type": "number"
          },
          "paddingRight": {
            "description": "Right padding (default: 0)",
            "type": "number"
          },
          "paddingBottom": {
            "description": "Bottom padding (default: 0)",
            "type": "number"
          },
          "paddingLeft": {
            "description": "Left padding (default: 0)",
            "type": "number"
          },
          "primaryAxisAlignItems": {
            "type": "string",
            "enum": [
              "MIN",
              "MAX",
              "CENTER",
              "SPACE_BETWEEN"
            ]
          },
          "counterAxisAlignItems": {
            "type": "string",
            "enum": [
              "MIN",
              "MAX",
              "CENTER",
              "BASELINE"
            ]
          },
          "layoutSizingHorizontal": {
            "type": "string",
            "enum": [
              "FIXED",
              "HUG",
              "FILL"
            ]
          },
          "layoutSizingVertical": {
            "type": "string",
            "enum": [
              "FIXED",
              "HUG",
              "FILL"
            ]
          },
          "layoutWrap": {
            "type": "string",
            "enum": [
              "NO_WRAP",
              "WRAP"
            ]
          }
        },
        "required": [
          "nodeIds"
        ]
      }
    },
    "depth": {
      "description": "Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.",
      "type": "number"
    }
  },
  "required": [
    "items"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
results(success | error)[]Per-item results.
idstringNode ID
errorstringError message for this item
warningsstring[]Deduplicated warnings hoisted from individual results
Example response
{
  "results": [
    {
      "id": "10:8"
    }
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "Per-item results.",
      "items": {
        "oneOf": [
          {
            "title": "success",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Node ID"
              }
            }
          },
          {
            "title": "error",
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Error message for this item"
              }
            },
            "required": [
              "error"
            ]
          }
        ]
      }
    },
    "warnings": {
      "type": "array",
      "description": "Deduplicated warnings hoisted from individual results",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "results"
  ]
}
create

Create text nodes. Prefer textStyleName for typography and fontColorStyleName or fontColorVariableId for color — hardcoded values skip design tokens. Supports custom fonts via fontFamily.

ParameterTypeRequiredDescription
itemsobject[]Array of text nodes to create
textstringText content
namestringLayer name (default: text content)
xnumberX position (default: 0)
ynumberY position (default: 0)
fontFamilystringFont family (default: Inter). Use get_available_fonts to list installed fonts.
fontStylestringFont style, e.g. 'Regular', 'Bold', 'Italic' (default: derived from fontWeight). Overrides fontWeight when set.
fontSizenumberFont size (default: 14)
fontWeightnumberFont weight: 100-900 (default: 400). Ignored when fontStyle is set.
fontColorobjectFont color. Default: black.
rnumber
gnumber
bnumber
anumber
fontColorVariableIdstringBind a color variable to the text fill instead of hardcoded fontColor.
fontColorStyleNamestringApply a paint style to the text fill by name (case-insensitive). Overrides fontColor.
parentIdstringParent node ID. Omit to place on current page.
textStyleIdstringText style ID to apply (overrides fontSize/fontWeight). Omit to skip.
textStyleNamestringText style name (case-insensitive match). Omit to skip.
textAlignHorizontal"LEFT" | "CENTER" | "RIGHT" | "JUSTIFIED"Horizontal text alignment (default: LEFT)
textAlignVertical"TOP" | "CENTER" | "BOTTOM"Vertical text alignment (default: TOP)
layoutSizingHorizontal"FIXED" | "HUG" | "FILL"Horizontal sizing. FILL auto-sets textAutoResize to HEIGHT.
layoutSizingVertical"FIXED" | "HUG" | "FILL"Vertical sizing (default: HUG)
textAutoResize"NONE" | "WIDTH_AND_HEIGHT" | "HEIGHT" | "TRUNCATE"Text auto-resize behavior (default: WIDTH_AND_HEIGHT when FILL)
depthnumberResponse detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.
JSON Schema
{
  "type": "object",
  "properties": {
    "items": {
      "description": "Array of text nodes to create",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text content"
          },
          "name": {
            "description": "Layer name (default: text content)",
            "type": "string"
          },
          "x": {
            "description": "X position (default: 0)",
            "type": "number"
          },
          "y": {
            "description": "Y position (default: 0)",
            "type": "number"
          },
          "fontFamily": {
            "description": "Font family (default: Inter). Use get_available_fonts to list installed fonts.",
            "type": "string"
          },
          "fontStyle": {
            "description": "Font style, e.g. 'Regular', 'Bold', 'Italic' (default: derived from fontWeight). Overrides fontWeight when set.",
            "type": "string"
          },
          "fontSize": {
            "description": "Font size (default: 14)",
            "type": "number"
          },
          "fontWeight": {
            "description": "Font weight: 100-900 (default: 400). Ignored when fontStyle is set.",
            "type": "number"
          },
          "fontColor": {
            "description": "Font color. Default: black.",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "g": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "b": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "a": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "r",
              "g",
              "b"
            ]
          },
          "fontColorVariableId": {
            "description": "Bind a color variable to the text fill instead of hardcoded fontColor.",
            "type": "string"
          },
          "fontColorStyleName": {
            "description": "Apply a paint style to the text fill by name (case-insensitive). Overrides fontColor.",
            "type": "string"
          },
          "parentId": {
            "description": "Parent node ID. Omit to place on current page.",
            "type": "string"
          },
          "textStyleId": {
            "description": "Text style ID to apply (overrides fontSize/fontWeight). Omit to skip.",
            "type": "string"
          },
          "textStyleName": {
            "description": "Text style name (case-insensitive match). Omit to skip.",
            "type": "string"
          },
          "textAlignHorizontal": {
            "description": "Horizontal text alignment (default: LEFT)",
            "type": "string",
            "enum": [
              "LEFT",
              "CENTER",
              "RIGHT",
              "JUSTIFIED"
            ]
          },
          "textAlignVertical": {
            "description": "Vertical text alignment (default: TOP)",
            "type": "string",
            "enum": [
              "TOP",
              "CENTER",
              "BOTTOM"
            ]
          },
          "layoutSizingHorizontal": {
            "description": "Horizontal sizing. FILL auto-sets textAutoResize to HEIGHT.",
            "type": "string",
            "enum": [
              "FIXED",
              "HUG",
              "FILL"
            ]
          },
          "layoutSizingVertical": {
            "description": "Vertical sizing (default: HUG)",
            "type": "string",
            "enum": [
              "FIXED",
              "HUG",
              "FILL"
            ]
          },
          "textAutoResize": {
            "description": "Text auto-resize behavior (default: WIDTH_AND_HEIGHT when FILL)",
            "type": "string",
            "enum": [
              "NONE",
              "WIDTH_AND_HEIGHT",
              "HEIGHT",
              "TRUNCATE"
            ]
          }
        },
        "required": [
          "text"
        ]
      }
    },
    "depth": {
      "description": "Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.",
      "type": "number"
    }
  },
  "required": [
    "items"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
results(success | error)[]Per-item results.
idstringNode ID
linkedTextStylestringName of auto-linked text style
linkedFontColorstringName of auto-linked font color style
errorstringError message for this item
warningsstring[]Deduplicated warnings hoisted from individual results
Example response
{
  "results": [
    {
      "id": "10:9"
    }
  ],
  "warnings": [
    "Hint: textStyleName 'Body' matches — use it for design token consistency."
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "Per-item results.",
      "items": {
        "oneOf": [
          {
            "title": "success",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Node ID"
              },
              "linkedTextStyle": {
                "type": "string",
                "description": "Name of auto-linked text style"
              },
              "linkedFontColor": {
                "type": "string",
                "description": "Name of auto-linked font color style"
              }
            }
          },
          {
            "title": "error",
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Error message for this item"
              }
            },
            "required": [
              "error"
            ]
          }
        ]
      }
    },
    "warnings": {
      "type": "array",
      "description": "Deduplicated warnings hoisted from individual results",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "results"
  ]
}