Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

create_frame

Add a new frame to Figma designs by specifying position, size, color, and other properties through the Claude Talk to Figma MCP server.

Instructions

Create a new frame in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX position
yYesY position
widthYesWidth of the frame
heightYesHeight of the frame
nameNoOptional name for the frame
parentIdNoOptional parent node ID to append the frame to
fillColorNoFill color in RGBA format
strokeColorNoStroke color in RGBA format
strokeWeightNoStroke weight

Implementation Reference

  • Complete registration of the 'create_frame' MCP tool, including Zod input schema, description, and the handler function that executes the tool by sending a 'create_frame' command to the Figma websocket utility and returns structured content response.
    server.tool(
      "create_frame",
      "Create a new frame in Figma",
      {
        x: z.number().describe("X position"),
        y: z.number().describe("Y position"),
        width: z.number().describe("Width of the frame"),
        height: z.number().describe("Height of the frame"),
        name: z.string().optional().describe("Optional name for the frame"),
        parentId: z
          .string()
          .optional()
          .describe("Optional parent node ID to append the frame to"),
        fillColor: z
          .object({
            r: z.number().min(0).max(1).describe("Red component (0-1)"),
            g: z.number().min(0).max(1).describe("Green component (0-1)"),
            b: z.number().min(0).max(1).describe("Blue component (0-1)"),
            a: z
              .number()
              .min(0)
              .max(1)
              .optional()
              .describe("Alpha component (0-1)"),
          })
          .optional()
          .describe("Fill color in RGBA format"),
        strokeColor: z
          .object({
            r: z.number().min(0).max(1).describe("Red component (0-1)"),
            g: z.number().min(0).max(1).describe("Green component (0-1)"),
            b: z.number().min(0).max(1).describe("Blue component (0-1)"),
            a: z
              .number()
              .min(0)
              .max(1)
              .optional()
              .describe("Alpha component (0-1)"),
          })
          .optional()
          .describe("Stroke color in RGBA format"),
        strokeWeight: z.number().positive().optional().describe("Stroke weight"),
      },
      async ({
        x,
        y,
        width,
        height,
        name,
        parentId,
        fillColor,
        strokeColor,
        strokeWeight,
      }) => {
        try {
          const result = await sendCommandToFigma("create_frame", {
            x,
            y,
            width,
            height,
            name: name || "Frame",
            parentId,
            fillColor: fillColor || { r: 1, g: 1, b: 1, a: 1 },
            strokeColor: strokeColor,
            strokeWeight: strokeWeight,
          });
          const typedResult = result as { name: string; id: string };
          return {
            content: [
              {
                type: "text",
                text: `Created frame "${typedResult.name}" with ID: ${typedResult.id}. Use the ID as the parentId to appendChild inside this frame.`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error creating frame: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
    );
  • 'create_frame' included in the FigmaCommand type union for type safety in internal command sending.
    | "create_frame"
  • Invocation of registerCreationTools which registers the create_frame tool (among creation tools) to the MCP server.
    registerCreationTools(server);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, the description doesn't address important behavioral aspects: whether this requires specific permissions, what happens on failure, if the frame becomes part of the current selection, or how it interacts with the Figma document structure. The description is minimal and lacks operational context.

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 maximally concise - a single sentence that states the core purpose without any wasted words. It's front-loaded with the essential information and contains no unnecessary elaboration or redundancy.

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 creation tool with 9 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what a frame is conceptually in Figma, how it differs from other shapes, what the tool returns (e.g., the new frame's ID), or provide any operational context. The agent would need to infer too much from the minimal description.

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 schema already documents all 9 parameters thoroughly. The description adds no parameter information beyond what's in the schema - it doesn't explain relationships between parameters (e.g., how parentId affects positioning) or provide usage examples. This meets the baseline for high schema coverage but doesn't add value.

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 ('Create') and resource ('a new frame in Figma'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other creation tools like create_rectangle or create_ellipse, which would require mentioning what makes a frame distinct (e.g., being a container for other elements).

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 multiple sibling creation tools (create_rectangle, create_ellipse, etc.), there's no indication of when a frame is the appropriate choice versus other shape types, nor any mention of prerequisites or context for usage.

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