Skip to main content
Glama
yhc984

Talk to Figma MCP

by yhc984

move_node

Reposition design elements in Figma by specifying new X and Y coordinates for precise layout adjustments.

Instructions

Move a node to a new position in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to move
xYesNew X position
yYesNew Y position

Implementation Reference

  • Core implementation of move_node tool: retrieves Figma node by ID, validates parameters, updates node position (x, y), and returns updated node information.
    async function moveNode(params) {
      const { nodeId, x, y } = params || {};
    
      if (!nodeId) {
        throw new Error("Missing nodeId parameter");
      }
    
      if (x === undefined || y === undefined) {
        throw new Error("Missing x or y parameters");
      }
    
      const node = await figma.getNodeByIdAsync(nodeId);
      if (!node) {
        throw new Error(`Node not found with ID: ${nodeId}`);
      }
    
      if (!("x" in node) || !("y" in node)) {
        throw new Error(`Node does not support position: ${nodeId}`);
      }
    
      node.x = x;
      node.y = y;
    
      return {
        id: node.id,
        name: node.name,
        x: node.x,
        y: node.y,
      };
    }
  • MCP server.tool registration for 'move_node', including schema validation with Zod (nodeId, x, y) and handler that forwards to Figma plugin via sendCommandToFigma.
      "move_node",
      "Move a node to a new position in Figma",
      {
        nodeId: z.string().describe("The ID of the node to move"),
        x: z.number().describe("New X position"),
        y: z.number().describe("New Y position")
      },
      async ({ nodeId, x, y }) => {
        try {
          const result = await sendCommandToFigma('move_node', { nodeId, x, y });
          const typedResult = result as { name: string };
          return {
            content: [
              {
                type: "text",
                text: `Moved node "${typedResult.name}" to position (${x}, ${y})`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error moving node: ${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
  • Zod input schema for move_node tool parameters: nodeId (string), x (number), y (number).
    {
      nodeId: z.string().describe("The ID of the node to move"),
      x: z.number().describe("New X position"),
      y: z.number().describe("New Y position")
    },
  • Dispatch handler case in Figma plugin code that routes 'move_node' command to the moveNode function.
    case "move_node":
      return await moveNode(params);
  • Type union FigmaCommand includes 'move_node' for type safety in sendCommandToFigma calls.
    | 'move_node'
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Move') but doesn't cover critical traits like whether this requires edit permissions, if it's destructive (likely yes, as it modifies node position), what happens on failure, or rate limits. This leaves significant gaps for a mutation tool.

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 that directly states the tool's function with zero wasted words. It efficiently communicates the core action without unnecessary elaboration, making it easy for an agent to parse quickly.

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 the tool's complexity (a mutation operation with no output schema and no annotations), the description is insufficient. It lacks details on behavioral traits, error handling, return values, or integration with sibling tools, leaving the agent under-informed for safe and effective use.

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?

The input schema has 100% description coverage, with clear parameter definitions (nodeId, x, y). The description adds no additional semantic context beyond implying positional movement, which aligns with the schema. This meets the baseline for high schema coverage without extra value.

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 verb ('Move') and resource ('a node') with the specific action ('to a new position in Figma'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'resize_node' or 'set_focus' that also modify node properties, which prevents a perfect score.

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. It doesn't mention prerequisites (e.g., needing node IDs from other tools), exclusions, or comparisons to similar tools like 'resize_node' or 'set_selections', leaving the agent without contextual usage cues.

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/yhc984/cursor-talk-to-figma-mcp-main'

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