get_styles
Extract all design styles from the current Figma document to access colors, typography, and effects for automation or analysis.
Instructions
Get all styles from the current Figma document
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/talk_to_figma_mcp/server.ts:941-969 (registration)Registration of the 'get_styles' MCP tool. The handler function sends a 'get_styles' command to the Figma plugin via sendCommandToFigma and returns the JSON-stringified result as text content. Input schema is empty object (no parameters). This is the primary implementation in the MCP server.// Get Styles Tool server.tool( "get_styles", "Get all styles from the current Figma document", {}, async () => { try { const result = await sendCommandToFigma("get_styles"); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting styles: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );