Skip to main content
Glama
by grab

resize_node

Resize design elements in Figma by specifying the node ID, width, and height. Modify dimensions programmatically through the Talk to Figma MCP server integration.

Instructions

Resize a node in Figma

Input Schema

NameRequiredDescriptionDefault
heightYesNew height
nodeIdYesThe ID of the node to resize
widthYesNew width

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "height": { "description": "New height", "exclusiveMinimum": 0, "type": "number" }, "nodeId": { "description": "The ID of the node to resize", "type": "string" }, "width": { "description": "New width", "exclusiveMinimum": 0, "type": "number" } }, "required": [ "nodeId", "width", "height" ], "type": "object" }

Implementation Reference

  • The handler and registration for the resize_node MCP tool. It accepts nodeId, width, and height parameters, sends a 'resize_node' command to the Figma plugin via sendCommandToFigma, and returns a success or error message.
    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 }: any) => { 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) }`, }, ], }; } } );

Other Tools

Related 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/grab/cursor-talk-to-figma-mcp'

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