get_styles
Retrieve all design styles from your current Figma document to access colors, typography, and effects for consistent implementation.
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:942-969 (handler)This is the handler function for the 'get_styles' MCP tool. It sends a 'get_styles' command to the Figma plugin through the WebSocket connection using sendCommandToFigma and returns the result as a text content block. If an error occurs, it returns an error message.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) }`, }, ], }; } } );