Skip to main content
Glama

create_ellipse

Add elliptical shapes to Figma designs by specifying position, dimensions, and styling options like fill and stroke colors.

Instructions

Create a new ellipse in Figma

Input Schema

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

Implementation Reference

  • The handler function for the 'create_ellipse' MCP tool. It sends a 'create_ellipse' command to Figma via websocket with provided parameters and returns a success message with the new ellipse ID or an error message.
    async ({ x, y, width, height, name, parentId, fillColor, strokeColor, strokeWeight }) => {
      try {
        const result = await sendCommandToFigma("create_ellipse", {
          x,
          y,
          width,
          height,
          name: name || "Ellipse",
          parentId,
          fillColor,
          strokeColor,
          strokeWeight,
        });
        
        const typedResult = result as { id: string, name: string };
        return {
          content: [
            {
              type: "text",
              text: `Created ellipse with ID: ${typedResult.id}`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error creating ellipse: ${error instanceof Error ? error.message : String(error)}`
            }
          ]
        };
      }
    }
  • Zod input schema defining parameters for the create_ellipse tool: position (x,y), dimensions (width,height), optional name, parentId, fillColor, strokeColor, strokeWeight.
    {
      x: z.number().describe("X position"),
      y: z.number().describe("Y position"),
      width: z.number().describe("Width of the ellipse"),
      height: z.number().describe("Height of the ellipse"),
      name: z.string().optional().describe("Optional name for the ellipse"),
      parentId: z.string().optional().describe("Optional parent node ID to append the ellipse 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"),
    },
  • Full registration of the 'create_ellipse' tool on the MCP server using server.tool(), including name, description, input schema, and handler function.
    server.tool(
      "create_ellipse",
      "Create a new ellipse in Figma",
      {
        x: z.number().describe("X position"),
        y: z.number().describe("Y position"),
        width: z.number().describe("Width of the ellipse"),
        height: z.number().describe("Height of the ellipse"),
        name: z.string().optional().describe("Optional name for the ellipse"),
        parentId: z.string().optional().describe("Optional parent node ID to append the ellipse 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_ellipse", {
            x,
            y,
            width,
            height,
            name: name || "Ellipse",
            parentId,
            fillColor,
            strokeColor,
            strokeWeight,
          });
          
          const typedResult = result as { id: string, name: string };
          return {
            content: [
              {
                type: "text",
                text: `Created ellipse with ID: ${typedResult.id}`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error creating ellipse: ${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
  • Top-level registration function that calls registerCreationTools(server), which registers the create_ellipse tool among others.
    export function registerTools(server: McpServer): void {
      registerDocumentTools(server);
      registerCreationTools(server);
      registerModificationTools(server);
      registerTextTools(server);
      registerComponentTools(server);
    }
  • TypeScript union type FigmaCommand that includes 'create_ellipse' as one of the supported Figma commands used in the codebase.
    export type FigmaCommand =
      | "get_document_info"
      | "get_selection"
      | "get_node_info"
      | "create_rectangle"
      | "create_frame"
      | "create_text"
      | "create_ellipse"
      | "create_polygon"
      | "create_star"
      | "create_vector"
      | "create_line"
      | "set_fill_color"
      | "set_stroke_color"
      | "move_node"
      | "resize_node"
      | "delete_node"
      | "get_styles"
      | "get_local_components"
      | "get_team_components"
      | "create_component_instance"
      | "export_node_as_image"
      | "join"
      | "set_corner_radius"
      | "clone_node"
      | "set_text_content"
      | "scan_text_nodes"
      | "set_multiple_text_contents"
      | "set_auto_layout"
      | "set_font_name"
      | "set_font_size"
      | "set_font_weight"
      | "set_letter_spacing"
      | "set_line_height"
      | "set_paragraph_spacing"
      | "set_text_case"
      | "set_text_decoration"
      | "get_styled_text_segments"
      | "load_font_async"
      | "get_remote_components"
      | "set_effects"
      | "set_effect_style_id"
      | "group_nodes"
      | "ungroup_nodes"
      | "flatten_node"
      | "insert_child";
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. 'Create a new ellipse' implies a write/mutation operation, but the description doesn't mention permissions needed, whether changes are reversible, rate limits, or what happens on success/failure. For a creation tool with zero annotation coverage, this is a significant gap.

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 states the core purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent 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?

For a creation tool with 9 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after creation (e.g., returns node ID), error conditions, or how it differs from other shape creation tools. The agent lacks critical context for proper tool selection and 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?

The schema description coverage is 100%, so the schema already documents all 9 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. According to guidelines, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 ellipse in Figma'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other shape creation siblings like create_rectangle or create_polygon, which would require a 5.

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 like create_rectangle or create_polygon. There's no mention of prerequisites, context, or comparison with sibling tools, leaving the agent without usage direction.

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