Extract Figma Styles
extract_stylesExtracts 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
| Name | Required | Description | Default |
|---|---|---|---|
| style_types | No | Filter to specific style types. Omit to include all (FILL, TEXT, EFFECT, GRID). | |
| output_format | No | Output format: 'structured' (grouped JSON), 'css' (custom properties), or 'raw' (node data) | structured |
| figma_file_key | Yes | The Figma file key (from the URL: figma.com/design/{THIS_PART}/...) |