Skip to main content
Glama

get_styles

Retrieve all styles from a Figma document to integrate design elements programmatically, enabling seamless workflow automation within the Talk to Figma MCP server.

Instructions

Get all styles from the current Figma document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get_styles' MCP tool, including the input schema (empty object) and the inline handler function that forwards the 'get_styles' command to the Figma plugin and returns the result as JSON text content.
    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) }`, }, ], }; } } );
  • The handler function that executes the tool logic: sends 'get_styles' command to Figma via sendCommandToFigma helper and formats the response as MCP content.
    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) }`, }, ], }; } }
  • Empty input schema for the get_styles tool (no parameters required).
    {},

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pipethedev/Talk-to-Figma-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server