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) }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Get' which implies a read operation, but doesn't disclose any behavioral traits such as authentication needs, rate limits, error handling, or what happens if the key doesn't exist. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence 'Get a style by key', which is front-loaded and wastes no words. Every part of the sentence contributes to the purpose, making it efficient and well-structured for its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't explain what a 'style' is, how keys are formatted, what the return value includes, or any error conditions. For a tool with minimal structured data, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'key' documented as 'The style key'. The description adds no additional meaning beyond this, as it merely restates 'by key'. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though no extra value is added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get a style by key' clearly states the action (get) and resource (style), but it's vague about what a 'style' entails in this context and doesn't distinguish from sibling tools like 'get_file_styles' or 'get_team_styles'. It provides basic purpose but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as 'get_file_styles' or 'get_team_styles'. The description implies usage by key but doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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