get_local_components
Retrieve all local components from a Figma document to streamline design automation and enable efficient programmatic interaction with design elements.
Instructions
Get all local components from the Figma document
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/talk_to_figma_mcp/server.ts:971-998 (registration)Registration and handler implementation of the MCP tool 'get_local_components'. The handler forwards the command to the Figma plugin using sendCommandToFigma and formats the response as text content. The input schema is empty object ({}).// Get Local Components Tool server.tool( "get_local_components", "Get all local components from the Figma document", {}, async () => { try { const result = await sendCommandToFigma("get_local_components"); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting local components: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } }