Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

resize_node

Change the dimensions of design elements in Figma by specifying new width and height values for precise layout adjustments.

Instructions

Resize a node in Figma

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic of the 'resize_node' tool. It invokes sendCommandToFigma to resize the specified node in Figma and returns a success or error message.
    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 schema defining the input parameters for the 'resize_node' tool: nodeId (string), width (positive number), height (positive number).
    {
      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"),
    },
  • The server.tool() call that registers the 'resize_node' tool on the MCP server, including its name, description, schema, and handler.
    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)}`,
              },
            ],
          };
        }
      }
    );
  • Registration of the modification tools module (including resize_node) by calling registerModificationTools in the tools index.
    registerModificationTools(server);
  • Top-level registration of all tools (including resize_node via chained calls) in the main server setup.
    registerTools(server);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Resize' implies a mutation, the description doesn't specify whether this operation is destructive, requires specific permissions, has side effects (e.g., affecting child nodes), or what happens on failure. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 front-loads the core purpose ('Resize a node in Figma') with zero wasted words. It's appropriately sized for a straightforward tool, making it easy 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 complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information about behavioral traits (e.g., whether resizing is reversible, error conditions), usage context relative to siblings, and expected outcomes. For a tool that modifies visual elements, more guidance is needed to ensure correct agent invocation.

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%, with clear descriptions for 'nodeId', 'width', and 'height' in the input schema. The description adds no additional parameter semantics beyond what's already documented in the schema, so it meets the baseline score of 3 without compensating for any gaps.

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 ('Resize') and target ('a node in Figma'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other node manipulation tools like 'move_node' or 'set_corner_radius' beyond the specific operation, 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. With many sibling tools that manipulate nodes (e.g., 'move_node', 'set_corner_radius'), there's no indication of when resizing is appropriate versus other modifications or how it relates to tools like 'export_node_as_image' that might depend on node dimensions.

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