delete_multiple_nodes
Remove multiple design elements simultaneously from Figma by specifying node IDs, streamlining bulk deletion tasks in design workflows.
Instructions
Delete multiple nodes from Figma at once
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeIds | Yes | Array of node IDs to delete |
Implementation Reference
- src/talk_to_figma_mcp/server.ts:798-828 (handler)The complete handler implementation for the 'delete_multiple_nodes' MCP tool. It registers the tool, defines its input schema (array of nodeIds), and provides the execution logic which forwards the command to the Figma plugin via sendCommandToFigma.// Delete Multiple Nodes Tool server.tool( "delete_multiple_nodes", "Delete multiple nodes from Figma at once", { nodeIds: z.array(z.string()).describe("Array of node IDs to delete"), }, async ({ nodeIds }) => { try { const result = await sendCommandToFigma("delete_multiple_nodes", { nodeIds }); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting multiple nodes: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );
- Input schema for the delete_multiple_nodes tool requiring an array of node ID strings.{ nodeIds: z.array(z.string()).describe("Array of node IDs to delete"), },
- src/talk_to_figma_mcp/server.ts:798-829 (registration)Registration of the delete_multiple_nodes tool using server.tool() in the MCP server.// Delete Multiple Nodes Tool server.tool( "delete_multiple_nodes", "Delete multiple nodes from Figma at once", { nodeIds: z.array(z.string()).describe("Array of node IDs to delete"), }, async ({ nodeIds }) => { try { const result = await sendCommandToFigma("delete_multiple_nodes", { nodeIds }); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting multiple nodes: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );