Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GITHUB_TOKENNoGitHub PAT with `repo` scope for PR generation and code scanning. Optional.
FIGMA_ACCESS_TOKENYesFigma personal access token with file read access. Required.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
extract_tokensA

Extract design tokens (variables) from a Figma file and convert to standard formats.

Fetches all Figma Variables from the specified file and converts them to the requested format. Supports W3C Design Token Community Group format, Style Dictionary input format, or raw Figma API response.

Args:

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

  • collection_names (string[], optional): Filter to specific variable collections

  • output_format ('w3c' | 'style-dictionary' | 'raw'): Output format (default: 'w3c')

Returns: JSON with token data and summary statistics including counts by type and collection.

Examples:

  • "Extract all design tokens from our Figma file" → extract_tokens with just figma_file_key

  • "Get only color tokens" → extract_tokens with collection_names: ["Colors"]

  • "Export tokens for Style Dictionary pipeline" → extract_tokens with output_format: "style-dictionary"

sync_tokens_to_codeA

Generate platform-specific design token files from Figma variables.

Extracts tokens from Figma, transforms them through Style Dictionary into platform-specific code (CSS custom properties, SCSS variables, Tailwind config, Swift UIColor, Kotlin Compose, or JSON).

This tool does NOT commit files — it returns the generated file contents for review. Use generate_sync_pr to commit and create a PR.

Args:

  • figma_file_key (string): The Figma file key

  • platforms (string[]): Target platforms — one or more of: 'css', 'scss', 'tailwind', 'swift', 'kotlin', 'json'

  • collection_names (string[], optional): Filter to specific collections

  • output_dir (string, optional): Output directory path (default: 'tokens')

Returns: JSON with generated files (path + content) and a summary of what was generated per platform.

Examples:

  • "Generate CSS and SCSS tokens from Figma" → sync_tokens_to_code with platforms: ["css", "scss"]

  • "Create mobile tokens" → sync_tokens_to_code with platforms: ["swift", "kotlin"]

audit_component_parityA

Compare Figma components against code components to find coverage gaps.

Fetches components from Figma and compares against a Storybook manifest or component mapping from GitHub. Uses fuzzy name matching (normalizes casing, strips spaces/hyphens) to find matches.

Args:

  • figma_file_key (string): The Figma file key

  • figma_page_name (string, optional): Filter Figma components to a specific page

  • github_repo (string): GitHub repo in 'owner/repo' format

  • storybook_manifest_path (string, optional): Path to stories.json in the repo

  • component_mapping_path (string, optional): Path to a JSON mapping file

Returns: Coverage report with: matched components, missing in code, missing in Figma, coverage percentage, and Figma links.

Examples:

  • "How many of our Figma components are implemented?" → audit_component_parity

  • "Check parity for our design system" → audit_component_parity with storybook path

audit_system_healthA

Run a comprehensive health check on your design system, combining token drift analysis and component parity into a single sync score.

This is an orchestrator tool that calls extract_tokens + audit_component_parity internally and merges the results into a unified health report.

Args:

  • figma_file_key (string): The Figma file key

  • github_repo (string): GitHub repo in 'owner/repo' format

  • token_file_path (string, optional): Path to token JSON file in the repo to diff against

  • storybook_manifest_path (string, optional): Path to stories.json for component parity

  • component_mapping_path (string, optional): Path to component mapping JSON

Returns: Health report with:

  • score (0-100): Overall sync health

  • tokenDrift: Token diff results (added, removed, changed)

  • componentParity: Component coverage results

  • warnings: Array of non-fatal errors encountered

  • timestamp: When the audit ran

Examples:

  • "How in sync is our design system?" → audit_system_health

  • "Give me a health report for our DS" → audit_system_health with all paths

generate_sync_prA

Create a GitHub pull request to sync design token changes from Figma to code.

Takes an array of file updates (typically from sync_tokens_to_code output) and creates a branch, commits the files, and opens a PR. Supports dry_run mode to preview without creating.

Args:

  • github_repo (string): GitHub repo in 'owner/repo' format

  • base_branch (string, optional): Base branch (default: repo's default branch)

  • token_updates (array): Files to update, each with 'path' and 'content'

  • pr_title (string, optional): PR title

  • pr_body (string, optional): Custom PR body

  • dry_run (boolean, optional): Preview without creating (default: false)

Returns: For dry_run: PR preview with branch name, title, body, and files. For real: Created PR URL, number, branch, and commit SHA.

Examples:

  • "Create a PR with the token updates" → generate_sync_pr with token_updates from sync_tokens_to_code

  • "Preview what the PR would look like" → generate_sync_pr with dry_run: true

extract_stylesA

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"

export_assetsA

Export SVG/PNG/JPG/PDF assets from Figma components.

Renders component nodes as images via the Figma Image API. Can export specific nodes by ID, filter by component name or page, and optionally fetch SVG content inline.

Args:

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

  • node_ids (string[], optional): Specific node IDs to export

  • component_names (string[], optional): Filter components by name

  • format ('svg' | 'png' | 'jpg' | 'pdf'): Export format (default: 'svg')

  • scale (number, optional): Render scale 0.01–4 (default: 1, ignored for SVG)

  • page_name (string, optional): Filter to a specific page

  • inline_svg (boolean, optional): Fetch SVG content inline (default: false)

Returns: JSON with asset URLs (and optional inline SVG content) for each exported component.

Examples:

  • "Export all icons as SVG" → export_assets with format: "svg", page_name: "Icons"

  • "Export Button component as PNG at 2x" → export_assets with component_names: ["Button"], format: "png", scale: 2

  • "Get inline SVG for the Logo" → export_assets with component_names: ["Logo"], inline_svg: true

detect_unused_tokensA

Scan a GitHub repository for design token usage and identify unused tokens.

Extracts tokens from a Figma file, derives CSS/SCSS/Tailwind variable names, and searches the GitHub repo for references. Reports which tokens have zero references in the codebase.

Args:

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

  • github_repo (string): GitHub repository in 'owner/repo' format

  • collection_names (string[], optional): Filter to specific variable collections

  • search_patterns (string[]): Pattern types to search: 'css', 'scss', 'tailwind', 'all' (default: ['all'])

  • file_extensions (string[], optional): Filter to specific file extensions

Returns: JSON report with total/used/unused token counts, usage map, and list of unused tokens.

Examples:

  • "Find unused tokens in our repo" → detect_unused_tokens with figma_file_key + github_repo

  • "Check if color tokens are used" → detect_unused_tokens with collection_names: ["Colors"]

  • "Search only CSS files" → detect_unused_tokens with file_extensions: ["css", "scss"]

get_design_contextA

Load design system context (tokens, components, patterns, rules) from a Figma file.

Call this before generating UI code to ensure the output uses correct design tokens, reuses existing components, and follows established patterns.

Args:

  • figma_file_key (string): The Figma file key

  • task_description (string, optional): Task context for relevance filtering

  • sections (string[], optional): Specific sections to include (default: all)

  • refresh (boolean): Force re-fetch from Figma (default: false)

Returns: Markdown document with design system tokens, components, patterns, and rules.

Examples:

  • "Load full design system" -> get_design_context with just figma_file_key

  • "Get context for a login form" -> get_design_context with task_description: "login form"

  • "Refresh tokens only" -> get_design_context with sections: ["tokens"], refresh: true

set_design_rulesA

Define explicit design rules that the AI should follow when generating code.

Rules supplement auto-inferred patterns and take precedence over them. Stored locally and persist across sessions.

Args:

  • figma_file_key (string): The Figma file key to associate rules with

  • rules (array): Design rules with optional category

  • mode ('replace' | 'append'): Whether to replace all rules or append (default: 'append')

Returns: Confirmation with total rule count.

Examples:

  • "Always use 8px grid" -> set_design_rules with rules: [{ rule: "Always use 8px grid", category: "spacing" }]

  • "Reset all rules" -> set_design_rules with mode: "replace", rules: [{ rule: "New rule" }]

generate_theme_configA

Extract multi-theme configurations from Figma Variable modes.

Generates theme-aware output files (CSS custom properties with theme selectors, Tailwind config, or TypeScript ThemeProvider) from Figma Variable modes (Light/Dark/etc).

Args:

  • figma_file_key (string): The Figma file key

  • output_format ('css' | 'tailwind' | 'theme-provider' | 'all'): Output format (default: 'css')

  • color_scheme_strategy ('data-attribute' | 'media-query' | 'class'): CSS selector strategy (default: 'data-attribute')

  • default_mode (string, optional): Override base theme mode name

Returns: JSON with generated file(s) and summary of modes/token counts.

generate_coded_componentsA

Generate production-ready, pixel-perfect coded components from Figma.

Extracts layout, colors, typography, spacing, effects from Figma node trees, resolves variable bindings to design tokens, diffs variants for state/dimensional overrides, detects nested components, and emits framework-specific code.

Args:

  • figma_file_key (string): The Figma file key

  • component_names (string[], optional): Specific components (default: all)

  • framework ('react-tailwind' | 'react-css' | 'react-native' | 'html-css'): Target framework

  • output_dir (string): Output directory (default: 'src/components')

  • state_prop_names (string[]): Variant props that become CSS pseudo-classes

  • include_storybook (boolean): Generate Storybook files (default: false)

Returns: JSON with generated component files, props, dependencies, and summary.

implement_designA

Convert a Figma frame into production code using design system tokens and components.

Every visual value (color, spacing, typography, shadow) is matched against the project's design system tokens. Matched values use token references (e.g., var(--primary)); unmatched values use raw Figma values and are flagged in the mapping report.

Args:

  • figma_file_key (string): Figma file key containing the frame to implement

  • node_id (string): Node ID of the frame/section to implement

  • framework ('react-tailwind' | 'react-css' | 'react-native' | 'html-css'): Target framework

  • component_name (string, optional): Name for the generated component (inferred from frame name if omitted)

  • design_system_file_key (string, optional): Figma file key for the design system (tokens, variables, components). Use when the design system is in a different file than the frame being implemented.

Returns: Three content blocks: generated code, token/component mapping report, and a Figma screenshot.

Prompts

Interactive templates invoked by user choice

NameDescription
use-design-systemLoad your Figma design system context for AI-assisted code generation. Ensures generated code uses correct tokens, components, and patterns.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 13 tools

Disambiguation4/5

The tools are mostly cleanly separated across extraction, auditing, context/rules, code generation, and PR syncing. The main potential confusion is between generate_coded_components and implement_design, since both generate code from Figma, but the descriptions distinguish component-set generation from single-frame implementation with token mapping.

Naming Consistency5/5

All tool names use consistent snake_case and are almost entirely verb-led noun phrases such as extract_tokens, audit_component_parity, and generate_sync_pr. There are no mixed camelCase or vague utility names.

Tool Count5/5

The server has 13 tools, which fits comfortably in the ideal 3-15 range for a design-system-to-code integration. Each tool maps to a recognizable phase of the workflow, with no obvious filler tools.

Completeness5/5

The surface covers token and style extraction, asset export, platform-specific token generation, theme configs, parity and health audits, unused-token detection, design context and rules, component generation, frame implementation, and PR creation. For a Figma design-system-to-code server, this is a comprehensive lifecycle with no obvious blocking gap.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues