duplicate_node
Clone nodes in Figma with specified positions, offsets, or parent attachments. Supports single or batch cloning, returning IDs of newly created nodes for further operations.
Instructions
Clones one or more nodes in Figma. Accepts either a single node config (via 'node') or an array of configs (via 'nodes'). Optionally, you can specify positions, offsets, and parent.
Returns:
content: Array of objects. Each object contains a type: "text" and a text field with the new node ID(s).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
node | No | A single node clone configuration. Optional. | |
nodes | No | An array of node clone configurations for batch cloning. Optional. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"node": {
"additionalProperties": false,
"description": "A single node clone configuration. Optional.",
"properties": {
"nodeId": {
"description": "ID of the node to clone.",
"type": "string"
},
"offsetX": {
"description": "Optional X offset to apply to the cloned node's position.",
"type": "number"
},
"offsetY": {
"description": "Optional Y offset to apply to the cloned node's position.",
"type": "number"
},
"parentId": {
"description": "Optional parent node ID to attach the cloned node to.",
"type": "string"
},
"position": {
"additionalProperties": false,
"description": "Optional absolute position for the cloned node.",
"properties": {
"x": {
"description": "X coordinate for the new node's position.",
"type": "number"
},
"y": {
"description": "Y coordinate for the new node's position.",
"type": "number"
}
},
"required": [
"x",
"y"
],
"type": "object"
}
},
"required": [
"nodeId"
],
"type": "object"
},
"nodes": {
"description": "An array of node clone configurations for batch cloning. Optional.",
"items": {
"$ref": "#/properties/node"
},
"type": "array"
}
},
"type": "object"
}