Skip to main content
Glama

clone_node

Duplicate Figma design elements by cloning nodes to new positions, enabling design iteration and layout adjustments through programmatic automation.

Instructions

Clone an existing node in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to clone
xNoNew X position for the clone
yNoNew Y position for the clone

Implementation Reference

  • The handler function registers the 'clone_node' MCP tool, defines its input schema (nodeId required, x/y optional), sends the command to the Figma plugin via WebSocket using sendCommandToFigma, processes the result or error, and returns a formatted text response with the new node's name and ID.
    server.tool( "clone_node", "Clone an existing node in Figma", { nodeId: z.string().describe("The ID of the node to clone"), x: z.number().optional().describe("New X position for the clone"), y: z.number().optional().describe("New Y position for the clone") }, async ({ nodeId, x, y }) => { try { const result = await sendCommandToFigma('clone_node', { nodeId, x, y }); const typedResult = result as { name: string, id: string }; return { content: [ { type: "text", text: `Cloned node "${typedResult.name}" with new ID: ${typedResult.id}${x !== undefined && y !== undefined ? ` at position (${x}, ${y})` : ''}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error cloning node: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreycretsu/cursor-talk-to-figma-mcp-main'

If you have feedback or need assistance with the MCP directory API, please join our Discord server