Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

clone_node

Clone a Figma node using its node ID. Optionally set new x,y coordinates and a parent node to place the copy, enabling quick duplication of design elements.

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 (local coordinates, relative to parent)
yNoNew Y position for the clone (local coordinates, relative to parent)
parentIdNoThe ID of the parent node to place the clone into. REQUIRED — server enforces this. Use page node ID for top-level elements.

Implementation Reference

  • The MCP server.tool registration and handler for the 'clone_node' tool. It defines the schema (nodeId, optional x/y, optional parentId) and the async handler that calls sendCommandToFigma('clone_node', ...) and returns the cloned node's name and ID.
    // 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.coerce.number().optional().describe("New X position for the clone (local coordinates, relative to parent)"),
        y: z.coerce.number().optional().describe("New Y position for the clone (local coordinates, relative to parent)"),
        parentId: z.string().optional().describe("The ID of the parent node to place the clone into. REQUIRED — server enforces this. Use page node ID for top-level elements.")
      },
      async ({ nodeId, x, y, parentId }) => {
        try {
          const result = await sendCommandToFigma('clone_node', { nodeId, x, y, parentId });
          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)}`
              }
            ]
          };
        }
      }
    );
  • The FigmaCommand union type includes 'clone_node' as a valid command string for type safety.
    | "clone_node"
  • src/socket.ts:53-58 (registration)
    The CREATION_COMMANDS set in socket.ts includes 'clone_node', ensuring it always requires a parentId and is routed through the command queue.
    // Creation commands that ALWAYS require parentId (prevents implicit page-context dependency)
    const CREATION_COMMANDS = new Set([
      "create_rectangle", "create_frame", "create_text", "create_ellipse",
      "create_polygon", "create_star", "create_vector", "create_line",
      "create_component_instance", "create_component_set", "set_svg",
      "clone_node", "create_component_from_node",
  • The registerCreationTools function that registers all creation tools (including clone_node) on the MCP server.
    export function registerCreationTools(server: McpServer): void {
      // Create Rectangle Tool
  • An example prompt documenting how to use clone_node to create a safe copy of a node before text replacement.
    \`\`\`
    // Clone the node to create a safe copy
    clone_node(nodeId: "selected-node-id", x: [new-x], y: [new-y])
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries full burden but only states 'Clone an existing node', omitting behaviors like positioning (via x,y,parentId parameters), return value, or side effects (e.g., new node ID).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler, efficiently conveying the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotation, the description should mention return values (e.g., cloned node ID) or success conditions, but it does not. The tool's result is unclear for agent planning.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions, so the description adds no extra meaning. Baseline 3 is appropriate as it does not degrade clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Clone an existing node in Figma' uses a specific verb ('Clone') and resource ('existing node'), clearly distinguishing it from sibling tools that create new nodes or modify existing ones.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus other creation or duplication tools. There is no mention of prerequisites (e.g., node must exist) or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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