delete_multiple_nodes
Remove multiple design elements simultaneously from Figma to streamline cleanup and editing 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:835-857 (handler)The handler function for the 'delete_multiple_nodes' tool. It takes an array of nodeIds, sends a 'delete_multiple_nodes' command to the Figma plugin via sendCommandToFigma, and returns the result as text content or an error message.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) }`, }, ], }; } }
- src/talk_to_figma_mcp/server.ts:829-858 (registration)Registration of the MCP tool 'delete_multiple_nodes' using server.tool, including the tool name, description, input schema, and handler function reference.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) }`, }, ], }; } } );
- Zod schema for the input parameters of the delete_multiple_nodes tool: an array of strings representing node IDs.{ nodeIds: z.array(z.string()).describe("Array of node IDs to delete"), },