Skip to main content
Glama

Extract Figma Styles

extract_styles
Read-onlyIdempotent

Extracts typography, fill, effect, and grid styles from Figma files with resolved values, with optional style-type filtering and structured JSON or CSS output.

Instructions

Extract typography, fill, effect, and grid styles from a Figma file with resolved values.

Unlike variables/tokens, styles contain visual properties like font families, colors, shadows, and grid layouts. This tool fetches style metadata AND resolves the actual property values from document nodes.

Args:

  • figma_file_key (string): The Figma file key from the URL

  • style_types (string[], optional): Filter to specific types: "FILL", "TEXT", "EFFECT", "GRID"

  • output_format ('structured' | 'css' | 'raw'): Output format (default: 'structured')

Returns: JSON with styles grouped by type, including resolved property values and summary statistics.

Examples:

  • "Extract all styles from our Figma file" → extract_styles with just figma_file_key

  • "Get only typography styles" → extract_styles with style_types: ["TEXT"]

  • "Export styles as CSS custom properties" → extract_styles with output_format: "css"

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "figma_file_key": "<figma_file_key>"
    },
    "name": "extract_styles"
  }
}

Input Schema

NameRequiredDescriptionDefault
style_typesNoFilter to specific style types. Omit to include all (FILL, TEXT, EFFECT, GRID).
output_formatNoOutput format: 'structured' (grouped JSON), 'css' (custom properties), or 'raw' (node data)structured
figma_file_keyYesThe Figma file key (from the URL: figma.com/design/{THIS_PART}/...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds real context beyond that: it fetches style metadata AND resolves actual property values from document nodes, and returns grouped JSON with summary statistics. It omits any mention of rate limits, large-file behavior, or failure modes for an open-world remote call.

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

Conciseness4/5

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

Front-loaded with the core purpose, then optionally nested detail in Args/Returns/Examples sections, so an agent can stop reading early. The Args block duplicates the schema and could be trimmed, which keeps it from a 5.

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

Completeness5/5

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

With no output schema, the description carries the burden of describing return values and does so (grouped-by-type JSON with resolved values and summary statistics). For a 3-parameter read-only extraction tool, nothing an agent needs in order to call it correctly is missing.

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% and the schema already documents the file key format, all four enum values, the default, and the meaning of each output_format. The Args block restates that information almost verbatim, adding little beyond the schema, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource (extract styles) plus the four style categories covered, and explicitly contrasts itself with variables/tokens — the domain of the sibling extract_tokens. An agent can distinguish the two without opening either schema.

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

Usage Guidelines4/5

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

The three worked examples map natural-language requests to concrete invocations, which effectively shows when the defaults are sufficient and when to filter by style_types or switch output_format. The 'Unlike variables/tokens' sentence implicitly routes token-related work elsewhere, but there is no explicit when-not-to-use statement.

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