Skip to main content
Glama

delete_node

Remove specific nodes from Figma designs using natural language commands, enabling precise editing and AI-assisted workflow integration.

Instructions

Delete a node from Figma

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

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

Implementation Reference

  • The handler function that implements the core logic of the delete_node tool by sending the delete command to Figma via WebSocket and handling the response.
    async ({ nodeId }) => { try { await sendCommandToFigma("delete_node", { nodeId }); return { content: [ { type: "text", text: `Deleted node with ID: ${nodeId}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error deleting node: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }
  • Zod input schema for the delete_node tool, requiring a nodeId string parameter.
    { nodeId: z.string().describe("The ID of the node to delete"), },
  • The server.tool() call that registers the delete_node tool with the MCP server, including description, schema, and handler.
    server.tool( "delete_node", "Delete a node from Figma", { nodeId: z.string().describe("The ID of the node to delete"), }, async ({ nodeId }) => { try { await sendCommandToFigma("delete_node", { nodeId }); return { content: [ { type: "text", text: `Deleted node with ID: ${nodeId}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error deleting node: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } } );
  • Top-level registration call for modification tools, which includes the delete_node tool.
    registerModificationTools(server);
  • FigmaCommand type definition includes 'delete_node' as a valid command type for sendCommandToFigma.
    | "delete_node"

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