Skip to main content
Glama
by grab

delete_node

Remove a specific node from Figma designs by specifying its ID, enabling programmatic design updates through natural language commands via the Talk to Figma MCP server.

Instructions

Delete a node from Figma

Input Schema

NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to delete

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "nodeId": { "description": "The ID of the node to delete", "type": "string" } }, "required": [ "nodeId" ], "type": "object" }

Implementation Reference

  • MCP tool registration for 'delete_node'. Includes input schema (nodeId: string), description, and handler function that proxies the delete_node command to the Figma plugin via WebSocket.
    // Delete Node Tool server.tool( "delete_node", "Delete a node from Figma", { nodeId: z.string().describe("The ID of the node to delete"), }, async ({ nodeId }: any) => { 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) }`, }, ], }; } } );
  • Handler function for delete_node tool. Sends 'delete_node' command with nodeId to Figma plugin and returns success/error message.
    async ({ nodeId }: any) => { 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 delete_node tool requiring nodeId as string.
    { nodeId: z.string().describe("The ID of the node to delete"), },
  • TypeScript type definition for delete_node command parameters in CommandParams interface.
    delete_node: { nodeId: string; };

Other Tools

Related 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/grab/cursor-talk-to-figma-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server