Skip to main content
Glama

resize_node

Change the dimensions of a Figma design element by specifying a new width and height 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

  • Registers the 'resize_node' MCP tool on the server, defining its input schema (nodeId, width, height) and handler function that sends a 'resize_node' command to Figma via websocket and returns a success/error text response.
    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)}`,
              },
            ],
          };
        }
      }
    );
  • Higher-level registration call to registerModificationTools(server), which includes the resize_node tool registration.
    registerModificationTools(server);
  • Top-level registration call to registerTools(server), which triggers the chain leading to resize_node tool registration.
    registerTools(server);
  • Type definition for FigmaCommand includes 'resize_node' as one of the possible commands sent internally to the Figma plugin.
    | "resize_node"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Resize' implies a mutation operation, but the description doesn't mention whether this requires specific permissions, whether the resize is constrained by parent containers, what happens to child elements, or if there are any rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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 perfectly concise at just four words, front-loading the essential action and target. Every word earns its place with zero waste or redundancy. This is an excellent example of efficient communication.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after resizing (success/failure indicators), whether changes are reversible, or how this interacts with other node properties. Given the complexity of modifying Figma nodes and the lack of structured safety information, more context is needed.

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%, so the input schema already documents all three parameters (nodeId, width, height) with their types and constraints. The description adds no additional parameter semantics beyond what's in the schema, such as units for width/height or nodeId format examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 from sibling tools like 'move_node' or 'set_corner_radius' which also modify node properties, leaving some ambiguity about when to choose this specific operation.

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 siblings like 'move_node', 'set_corner_radius', and various styling tools, there's no indication whether resize should be used for dimensional changes while other tools handle positional or stylistic modifications. No prerequisites or exclusions are mentioned.

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/agenisea/cc-fig-mcp'

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