Skip to main content
Glama

clone_node

Duplicate design elements directly in Figma using AI commands. Simplify node replication to enhance design workflows while maintaining consistency.

Instructions

Clone an existing node in Figma

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • The MCP tool handler for 'clone_node'. Registers the tool, defines the input schema using Zod, and implements the execution logic by sending a 'clone_node' command to the Figma plugin via websocket. Returns success/error messages.
    // Clone Node Tool 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)}` } ] }; } } );
  • Registration call for creation tools, which includes the clone_node tool.
    registerCreationTools(server);
  • Top-level registration of all tools via registerTools(server), which calls registerCreationTools including clone_node.
    registerTools(server);
  • Input schema (Zod) for the clone_node tool defining parameters nodeId, x (optional), y (optional).
    { 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") },
  • 'clone_node' included in FigmaCommand type union for TypeScript type safety.
    | "clone_node"

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/arinspunk/claude-talk-to-figma-mcp'

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