Skip to content

Commit 8f1b206

Browse files
committed
Improve sfnext-match-tokens-to-theme rename detection (restore Figma refs for >50% similarity)
Made-with: Cursor
1 parent 575231d commit 8f1b206

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/mcp/tools/sfnext-match-tokens-to-theme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
description: Match design tokens to existing theme tokens in app.css with confidence scores and suggestions.
2+
description: Match Figma design tokens to existing theme tokens in app.css with confidence scores and suggestions.
33
---
44

55
# sfnext_match_tokens_to_theme
66

7-
Matches design tokens (colors, spacing, radius, etc.) to your Storefront Next theme tokens in `app.css`. Helps you identify which design tokens match existing theme variables and suggests new token names for values that don't have matches.
7+
Matches Figma design tokens (colors, spacing, radius, etc.) to your Storefront Next theme tokens in `app.css`. Helps you identify which design tokens match existing theme variables and suggests new token names for values that don't have matches.
88

99
> **Note:** 🚧 This MCP tool is for Storefront Next. Storefront Next is part of a closed pilot and isn't available for general use.
1010
1111
## Overview
1212

1313
The `sfnext_match_tokens_to_theme` tool helps you use theme tokens instead of hardcoded values in your components. After retrieving design tokens (from Figma, design handoff, or other sources), use this tool to match them against your Storefront Next theme.
1414

15-
The tool reads your `app.css` theme file (or you can specify a custom path) and compares design tokens against your existing theme variables. It returns a report with instructions showing which tokens match, which are similar, and which need new theme variables created. **The tool does not modify files**—it provides recommendations and instructions for you to apply.
15+
The tool reads your `app.css` theme file (or you can specify a custom path) and compares Figma design tokens against your existing theme variables. It returns a report with instructions showing which tokens match, which are similar, and which need new theme variables created. **The tool does not modify files**—it provides recommendations and instructions for you to apply.
1616

1717
This tool is part of the STOREFRONTNEXT toolset.
1818

@@ -30,16 +30,16 @@ See [Figma-to-Component Tools Setup](../figma-tools-setup) for complete prerequi
3030
| `figmaTokens` | array | Yes | Array of design tokens (e.g., from Figma, design system, or style guide). |
3131
| `themeFilePath` | string | No | Optional absolute path to theme CSS file. If not provided, searches for `app.css` in common locations. |
3232

33-
### Token Schema
33+
### Figma Token Schema
3434

3535
Each token in `figmaTokens` must have:
3636

3737
| Field | Type | Required | Description |
3838
|-------|------|----------|-------------|
39-
| `name` | string | Yes | Token name (e.g., `"Primary/Blue"`, `"Spacing/Large"`). |
39+
| `name` | string | Yes | Token name from Figma (e.g., `"Primary/Blue"`, `"Spacing/Large"`). |
4040
| `value` | string | Yes | Token value (e.g., `"#2563eb"`, `"16px"`, `"0.5rem"`). |
4141
| `type` | string | Yes | One of: `color`, `spacing`, `radius`, `opacity`, `fontSize`, `fontFamily`, `other`. |
42-
| `description` | string | No | Optional description. |
42+
| `description` | string | No | Optional description from Figma. |
4343

4444
## Usage Examples
4545

@@ -58,7 +58,7 @@ Use the MCP tool to match these design tokens to my theme at /path/to/app.css:
5858
## Output
5959

6060
Returns a report (does not modify files) showing:
61-
- Which design tokens match existing theme variables (exact matches)
61+
- Which Figma design tokens match existing theme variables (exact matches)
6262
- Which tokens are similar to existing variables (suggested matches)
6363
- Which tokens need new theme variables created (with suggested names)
6464
- Instructions for using the matched tokens in components and adding new tokens to your theme file

0 commit comments

Comments
 (0)