Skip to main content
Glama
LeoGCode

figma-reader-mcp

by LeoGCode

figma_get_styles

Extract Figma styles (colors, strokes, text, effects, grids) from .fig files or Figma URLs, outputting JSON or CSS for design system analysis and code generation.

Instructions

Local (and imported library) styles with their values: FILL (color), STROKE, TEXT, EFFECT and GRID. Formats: json (default) or css. A file with no styles, or none of the type asked for, answers empty in that format.

Input Schema

NameRequiredDescriptionDefault
fileYesA local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help)
typeNoOnly styles of this type
formatNo
refreshNoExport the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help)
out_fileNoAlso write the result to this path. The answer then ends with a note, not written to the file: '(written to <path>; exportedAt <time>, account "<name>" (source: <source>))', or '(written to <path>; fileModifiedAt <time>)' for a local .fig
css_prefixNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.2
    • changedInput schema / properties / file / description
      Previous value: -"Path to a local .fig file, or a Figma file key / figma.com/design/... URL. A node-id in the URL is used when this tool takes node_id and it is omitted; a tool that answers about the whole file ignores it. A key or URL uses a local '<name> [<key>].fig' from FIGMA_FILES_DIRS when one exists, otherwise exports through the browser."New value: +"A local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help)"
    • changedInput schema / properties / out_file / description
      Previous value: -"Also write the result to this path"New value: +"Also write the result to this path. The answer then ends with a note, not written to the file: '(written to <path>; exportedAt <time>, account \"<name>\" (source: <source>))', or '(written to <path>; fileModifiedAt <time>)' for a local .fig"
    • changedInput schema / properties / refresh / description
      Previous value: -"Skip local/cached copies and export the live file through the browser. Has no effect when file is a path to a .fig: that file is read as it is on disk and the result carries refreshIgnored; pass the key or URL to export the live file instead."New value: +"Export the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help)"
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: json is the default format, css is an alternative, and a file with no styles (or none of the requested type) returns an empty result in the chosen format. It does not explain that out_file writes to disk, which is what justifies readOnlyHint=false, but the added format/empty-result semantics are substantive.

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?

Three tight sentences, front-loaded with the resource and its scope, followed by formats and then the empty-result edge case. Only the final empty-result sentence is slightly convoluted, but nothing is wasted.

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

Completeness3/5

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

For a 6-parameter read tool with no output schema, the description covers style types, output formats and the empty case, but leaves refresh, out_file side effects and css_prefix unexplained and does not describe the shape of the returned values beyond 'with their values'.

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 coverage is 67%. The description restates the type enum values and adds the json default for format, but says nothing about file, refresh, out_file, or css_prefix. With the schema already documenting most parameters, this is a baseline 3.

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

Purpose4/5

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

States a specific verb+resource: retrieve styles with their values, and enumerates the style kinds (FILL, STROKE, TEXT, EFFECT, GRID). This is distinguishable from siblings like figma_get_variables or figma_get_components by resource type, though it never names them explicitly.

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?

The description clarifies scope ('local and imported library styles') but gives no when-to-use guidance or alternatives. It never tells the agent when to reach for figma_get_styles versus figma_get_variables or figma_get_components.

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