move_node
Reposition design elements in Figma by specifying new X and Y coordinates to adjust layout placement.
Instructions
Move a node to a new position in Figma
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | The ID of the node to move | |
| x | Yes | New X position | |
| y | Yes | New Y position |
Implementation Reference
- The complete handler implementation for the 'move_node' MCP tool, registered via server.tool(). It defines the input schema, description, and the async execution function that sends the move command to the Figma plugin.server.tool( "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 the move_node tool parameters.{ 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"), },
- src/talk_to_figma_mcp/tools/index.ts:15-15 (registration)Top-level registration call that includes the move_node tool via registerModificationTools.registerModificationTools(server);
- Type definition for FigmaCommand enum including 'move_node'.| "move_node"