Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

clone_node

Duplicate Figma design elements by cloning nodes to new positions, enabling rapid iteration and layout adjustments within your projects.

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 registration of the 'clone_node' MCP tool, including input schema using Zod and the handler function that forwards the clone_node command to the Figma plugin via sendCommandToFigma websocket utility.
    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)}`
              }
            ]
          };
        }
      }
    );
  • The handler function for the clone_node tool that executes the logic by calling sendCommandToFigma and formatting the response.
      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)}`
            }
          ]
        };
      }
    }
  • Zod schema defining the input parameters for the clone_node tool.
    {
      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")
    },
  • The 'clone_node' command is listed in the FigmaCommand type union, used for type safety in sendCommandToFigma calls.
    | "clone_node"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Clone an existing node' implies a mutation operation that creates a copy, but the description doesn't specify whether this requires edit permissions, what happens to the original node, whether the clone inherits all properties, or what the expected outcome looks like. For a mutation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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, efficient sentence that states the core functionality without unnecessary words. It's appropriately sized for a straightforward tool and front-loads the essential information. Every word earns its place in this concise formulation.

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?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what gets cloned (just properties or also children?), what permissions are required, whether the operation is reversible, or what the result looks like. With many sibling tools for node manipulation, more context about how cloning fits into the overall workflow would be valuable.

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 description coverage is 100%, so the schema already documents all three parameters (nodeId, x, y) with clear descriptions. The tool description adds no additional parameter information beyond what's in the schema. With complete schema coverage, the baseline score of 3 is appropriate since the description doesn't need to compensate for schema gaps but also doesn't enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the action ('clone') and target resource ('an existing node in Figma'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other node manipulation tools like 'duplicate_node' (if that existed) or explain how cloning differs from creating new nodes with sibling tools like 'create_rectangle' or 'create_frame'.

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?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools for creating and manipulating nodes (create_rectangle, create_frame, move_node, etc.), there's no indication whether cloning is preferred over creating new nodes or when repositioning should be done via cloning versus move_node. The description offers no context about prerequisites or typical use cases.

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