delete_multiple_nodes
Remove multiple nodes simultaneously in Figma via the Talk to Figma MCP server to simplify design cleanup and improve efficiency.
Instructions
Delete multiple nodes from Figma at once
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/talk_to_figma_mcp/server.ts:829-858 (registration)MCP tool registration for 'delete_multiple_nodes', including input schema (nodeIds array) and handler that proxies the command to the Figma plugin via sendCommandToFigmaserver.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) }`, }, ], }; } } );
- src/talk_to_figma_mcp/server.ts:835-857 (handler)Handler function for the delete_multiple_nodes tool. It sends the nodeIds to the Figma plugin using sendCommandToFigma and returns the result or error.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 input schema for the tool: requires an array of node ID strings.{ nodeIds: z.array(z.string()).describe("Array of node IDs to delete"), },