Skip to content

Commit 4f75895

Browse files
committed
Update sfnext-match-tokens-to-theme content (match vs map, design tokens)
Made-with: Cursor
1 parent 12f7fa7 commit 4f75895

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

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

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

5-
# storefront_next_map_tokens_to_theme
5+
# sfnext_match_tokens_to_theme
66

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

13-
The `storefront_next_map_tokens_to_theme` tool helps you use theme tokens instead of hardcoded values in your components. After retrieving design tokens from Figma, use this tool to map them to your Storefront Next theme.
13+
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 Figma 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 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

1919
## Prerequisites
2020

2121
- Storefront Next project with `app.css` (or provide `themeFilePath` explicitly)
22-
- Figma tokens extracted from design (colors, spacing, radius, etc.)
22+
- Design tokens extracted (from Figma, design system, or other sources)
2323

2424
See [Figma-to-Component Tools Setup](../figma-tools-setup) for complete prerequisites and configuration.
2525

2626
## Parameters
2727

2828
| Parameter | Type | Required | Description |
2929
|-----------|------|----------|-------------|
30-
| `figmaTokens` | array | Yes | Array of design tokens extracted from Figma. |
30+
| `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-
### Figma Token Schema
33+
### Token Schema
3434

3535
Each token in `figmaTokens` must have:
3636

3737
| Field | Type | Required | Description |
3838
|-------|------|----------|-------------|
39-
| `name` | string | Yes | Token name from Figma (e.g., `"Primary/Blue"`, `"Spacing/Large"`). |
39+
| `name` | string | Yes | Token name (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 from Figma. |
43-
44-
45-
## Output
46-
47-
Returns a report (does not modify files) showing:
48-
- Which Figma tokens match existing theme variables (exact matches)
49-
- Which tokens are similar to existing variables (suggested matches)
50-
- Which tokens need new theme variables created (with suggested names)
51-
- Instructions for using the matched tokens in components and adding new tokens to your theme file
42+
| `description` | string | No | Optional description. |
5243

5344
## Usage Examples
5445

55-
**Map Figma tokens to your theme:**
46+
**Match design tokens to your theme (default app.css):**
5647
```
57-
Use the MCP tool to map these Figma tokens to my theme: Primary/Blue #2563eb (color), Spacing/Large 16px (spacing).
48+
Use the MCP tool to match these design tokens to my theme: Primary/Blue #2563eb (color), Spacing/Large 16px (spacing).
5849
```
5950

60-
**With custom theme file path:**
51+
**Match design tokens with custom theme file path:**
6152
```
62-
Use the MCP tool to map Figma design tokens to my theme file at /path/to/app.css.
53+
Use the MCP tool to match these design tokens to my theme at /path/to/app.css:
54+
- Primary/Blue #2563eb (color)
55+
- Spacing/Large 16px (spacing)
6356
```
6457

58+
## Output
59+
60+
Returns a report (does not modify files) showing:
61+
- Which design tokens match existing theme variables (exact matches)
62+
- Which tokens are similar to existing variables (suggested matches)
63+
- Which tokens need new theme variables created (with suggested names)
64+
- Instructions for using the matched tokens in components and adding new tokens to your theme file
6565

6666
## Related Tools
6767

68-
- [`storefront_next_figma_to_component_workflow`](./storefront-next-figma-to-component-workflow) - Workflow orchestrator; call first
69-
- [`storefront_next_generate_component`](./storefront-next-generate-component) - REUSE/EXTEND/CREATE recommendation
68+
- [`sfnext_start_figma_workflow`](./sfnext-start-figma-workflow) - Workflow orchestrator; call first
69+
- [`sfnext_analyze_component`](./sfnext-analyze-component) - REUSE/EXTEND/CREATE recommendation
7070
- Part of the [STOREFRONTNEXT](../toolsets#storefrontnext) toolset
7171
- Auto-enabled for Storefront Next projects
7272

0 commit comments

Comments
 (0)