Skip to main content
Glama

create_ellipse

Create ellipses in Figma designs by specifying position, dimensions, colors, and styling for visual elements.

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

  • MCP tool registration, input schema (Zod), and handler implementation for 'create_ellipse'. The handler sends a 'create_ellipse' command to Figma via WebSocket and returns the result ID or error.
    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)}` } ] }; } } );
  • Registration of creation tools module (including create_ellipse) within the aggregate registerTools function.
    registerCreationTools(server);
  • Top-level call to register all tools, which chains to registerCreationTools and thus create_ellipse.
    registerTools(server);
  • Type definition for FigmaCommand union including 'create_ellipse' used internally for command typing.
    | "create_ellipse"

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