Skip to main content
Glama

flatten_node

Flatten nodes in Figma for boolean operations or converting to paths, enabling streamlined design adjustments through AI-assisted commands in the Claude Talk to Figma MCP server.

Instructions

Flatten a node in Figma (e.g., for boolean operations or converting to path)

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • Registration of the MCP 'flatten_node' tool, including description, input schema (nodeId), and handler that forwards the flatten_node command to Figma via sendCommandToFigma and formats the response.
    server.tool( "flatten_node", "Flatten a node in Figma (e.g., for boolean operations or converting to path)", { nodeId: z.string().describe("ID of the node to flatten"), }, async ({ nodeId }) => { try { const result = await sendCommandToFigma("flatten_node", { nodeId }); const typedResult = result as { id: string, name: string, type: string }; return { content: [ { type: "text", text: `Node "${typedResult.name}" flattened successfully. The new node has ID: ${typedResult.id} and is of type ${typedResult.type}.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error flattening node: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
  • Zod input schema for the flatten_node tool: requires nodeId string.
    { nodeId: z.string().describe("ID of the node to flatten"), },
  • FigmaCommand type union includes "flatten_node" as a valid command type.
    | "flatten_node" | "insert_child";

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