Skip to main content
Glama

resize_node

Modify dimensions of a Figma node to adjust its size programmatically, enabling automated design updates through natural language commands.

Instructions

Resize a node in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'resize_node' MCP tool, including input schema (nodeId, width, height) and thin handler that forwards to Figma plugin's resize_node command via sendCommandToFigma, with success/error responses.
    server.tool( "resize_node", "Resize a node in Figma", { nodeId: z.string().describe("The ID of the node to resize"), width: z.number().positive().describe("New width"), height: z.number().positive().describe("New height"), }, async ({ nodeId, width, height }) => { try { const result = await sendCommandToFigma("resize_node", { nodeId, width, height, }); const typedResult = result as { name: string }; return { content: [ { type: "text", text: `Resized node "${typedResult.name}" to width ${width} and height ${height}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error resizing node: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );
  • Zod input schema for resize_node tool parameters.
    { nodeId: z.string().describe("The ID of the node to resize"), width: z.number().positive().describe("New width"), height: z.number().positive().describe("New height"), },
  • Handler function for resize_node tool that calls the underlying Figma plugin command and formats the response.
    async ({ nodeId, width, height }) => { try { const result = await sendCommandToFigma("resize_node", { nodeId, width, height, }); const typedResult = result as { name: string }; return { content: [ { type: "text", text: `Resized node "${typedResult.name}" to width ${width} and height ${height}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error resizing node: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } }
  • TypeScript type definition for resize_node command parameters in CommandParams.
    resize_node: { nodeId: string; width: number; height: number; };

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

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