Skip to main content
Glama

get_style

Retrieve Figma design styles by key to access colors, typography, and effects for consistent UI implementation.

Instructions

Get a style by key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe style key

Implementation Reference

  • The core handler function for the 'get_style' tool. It extracts the style key from arguments and makes an API request to Figma's /styles/{key} endpoint to retrieve the style details.
    async getStyle(args: GetStyleArgs) { const { key } = args; return this.api.makeRequest(`/styles/${key}`); }
  • TypeScript interface defining the input arguments for the get_style tool, requiring a single 'key' property of type string.
    export interface GetStyleArgs { key: string; }
  • src/index.ts:447-460 (registration)
    MCP tool registration in the listTools response, defining the name, description, and input schema for 'get_style'.
    { name: 'get_style', description: 'Get a style by key', inputSchema: { type: 'object', properties: { key: { type: 'string', description: 'The style key' } }, required: ['key'] }, }
  • src/index.ts:610-616 (registration)
    Dispatch handler in the CallToolRequest that validates arguments using GetStyleArgs type and delegates to projectsHandler.getStyle.
    case 'get_style': { const args = this.validateArgs<GetStyleArgs>(request.params.arguments, ['key']); const result = await this.projectsHandler.getStyle(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }

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/smithery-ai/mcp-figma'

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