feat(mcp): Replace design token tools with enhanced search and bundle system#7574
Merged
lukasoppermann merged 13 commits intomainfrom Feb 24, 2026
Merged
feat(mcp): Replace design token tools with enhanced search and bundle system#7574lukasoppermann merged 13 commits intomainfrom
lukasoppermann merged 13 commits intomainfrom
Conversation
… system Replace the single list_tokens tool with four new design token tools: - find_tokens: keyword search with group filtering and alias resolution - get_token_group_bundle: fetch tokens across multiple groups in one call - get_design_token_specs: logic matrix, color pairings, and group reference - get_token_usage_patterns: golden example CSS for buttons and layouts Add comprehensive token guidelines support in primitives.ts including: - Token spec parsing from DESIGN_TOKENS_SPEC.md - Group alias mapping for fuzzy/human-readable group names - Token pattern expansion (e.g., [accent, danger] variants) - Formatted Markdown bundle output - Graceful fallback when primitives files are not yet available All non-design-token tools (components, patterns, icons, foundations, coding guidelines, accessibility) remain unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 294ce2a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
13 tasks
Contributor
|
@lukasoppermann I've opened a new pull request, #7575, to work on those changes. Once the pull request is ready, I'll request review from you. |
…text (#7575) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lukasoppermann <813754+lukasoppermann@users.noreply.github.com>
listTokenGroups() was only reading categories.functional.themes.light, which omitted non-theme groups like stack, text, borderRadius, borderWidth, outline, spinner, etc. Now uses the full tokens array so get_design_token_specs provides a complete group map. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The description documents group-only mode (omit query, provide only group), but query was required in the schema, causing validation failure. Now optional with empty string default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
siddharthkp
approved these changes
Feb 20, 2026
Member
siddharthkp
left a comment
There was a problem hiding this comment.
I have no idea what this means but I believe in you
Store canonical group prefix (e.g. 'bgColor') in token.group instead of human-readable label (e.g. 'background color'). Add GROUP_LABELS map for display purposes in formatBundle headers. This makes group filtering, valid-groups messaging, and tokenMatchesGroup comparisons consistent. No behavior change: GROUP_ALIASES still resolves human-readable inputs before any matching occurs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the single
list_tokenstool in the MCP server with four new design token tools that provide better token discovery and usage guidance.New tools
find_tokensget_token_group_bundleget_design_token_specsget_token_usage_patternsChanges to
primitives.tsDESIGN_TOKENS_SPEC.mdbgColor)[accent, danger]variants)radius.json,DESIGN_TOKENS_SPEC.md,DESIGN_TOKENS_GUIDE.md) are not yet availableWhat's unchanged
All non-design-token tools remain untouched: components, patterns, icons, foundations, coding guidelines, and accessibility.
Integration tests
Integration tests skipped: MCP-only changes in this PR