Skip to main content
Glama

delete_node

Remove a node from Figma designs programmatically using Cursor AI, enabling automation of design modifications through natural language commands.

Instructions

Delete a node from Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and handler implementation for 'delete_node'. The asynchronous handler function executes the tool logic by forwarding the 'delete_node' command with the provided nodeId to the underlying Figma plugin via sendCommandToFigma, handles success/error responses, and returns formatted content blocks.
    // 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 }) => { 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 schema defining the input parameters for the delete_node tool: a required 'nodeId' string describing the ID of the node to delete.
    { nodeId: z.string().describe("The ID of the node to delete"), },
  • TypeScript type definition in CommandParams for delete_node parameters, reinforcing the schema with { nodeId: string }.
    delete_node: { nodeId: string; };

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/andreycretsu/cursor-talk-to-figma-mcp-main'

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