docs: add S2 style macro MCP tool #9336
Merged
+182
−1
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.
Adds a new
get_style_macro_property_valuestool to the S2 MCP server.Example tool call:
Response
{ "values":[ "accent", "accent-subtle", "neutral", "neutral-subdued", "neutral-subtle", "negative", "negative-subtle", "informative", "informative-subtle", "positive", "positive-subtle", "notice", "notice-subtle", "gray", "gray-subtle", "red", "red-subtle", "orange", "orange-subtle", "yellow", "yellow-subtle", "chartreuse", "chartreuse-subtle", "celery", "celery-subtle", "green", "green-subtle", "seafoam", "seafoam-subtle", "cyan", "cyan-subtle", "blue", "blue-subtle", "indigo", "indigo-subtle", "purple", "purple-subtle", "fuchsia", "fuchsia-subtle", "magenta", "magenta-subtle", "pink", "pink-subtle", "turquoise", "turquoise-subtle", "cinnamon", "cinnamon-subtle", "brown", "brown-subtle", "silver", "silver-subtle", "disabled", "base", "layer-1", "layer-2", "pasteboard", "elevated", "accent-100", "accent-1000", "accent-1100", "accent-1200", "accent-1300", "accent-1400", "accent-1500", "accent-1600", "accent-200", "accent-300", "accent-400", "accent-500", "accent-600", "accent-700", "accent-800", "accent-900", "Background", "black", "blue-100", "blue-1000", "blue-1100", "blue-1200", "blue-1300", "blue-1400", "blue-1500", "blue-1600", "blue-200", "blue-300", "blue-400", "blue-500", "blue-600", "blue-700", "blue-800", "blue-900", "brown-100", "brown-1000", "brown-1100", "brown-1200", "brown-1300", "brown-1400", "brown-1500", "brown-1600", "brown-200", "brown-300", "brown-400", "brown-500", "brown-600", "brown-700", "brown-800", "brown-900", "ButtonBorder", "ButtonFace", "ButtonText", "celery-100", "celery-1000", "celery-1100", "celery-1200", "celery-1300", "celery-1400", "celery-1500", "celery-1600", "celery-200", "celery-300", "celery-400", "celery-500", "celery-600", "celery-700", "celery-800", "celery-900", "chartreuse-100", "chartreuse-1000", "chartreuse-1100", "chartreuse-1200", "chartreuse-1300", "chartreuse-1400", "chartreuse-1500", "chartreuse-1600", "chartreuse-200", "chartreuse-300", "chartreuse-400", "chartreuse-500", "chartreuse-600", "chartreuse-700", "chartreuse-800", "chartreuse-900", "cinnamon-100", "cinnamon-1000", "cinnamon-1100", "cinnamon-1200", "cinnamon-1300", "cinnamon-1400", "cinnamon-1500", "cinnamon-1600", "cinnamon-200", "cinnamon-300", "cinnamon-400", "cinnamon-500", "cinnamon-600", "cinnamon-700", "cinnamon-800", "cinnamon-900", "cyan-100", "cyan-1000", "cyan-1100", "cyan-1200", "cyan-1300", "cyan-1400", "cyan-1500", "cyan-1600", "cyan-200", "cyan-300", "cyan-400", "cyan-500", "cyan-600", "cyan-700", "cyan-800", "cyan-900", "Field", "fuchsia-100", "fuchsia-1000", "fuchsia-1100", "fuchsia-1200", "fuchsia-1300", "fuchsia-1400", "fuchsia-1500", "fuchsia-1600", "fuchsia-200", "fuchsia-300", "fuchsia-400", "fuchsia-500", "fuchsia-600", "fuchsia-700", "fuchsia-800", "fuchsia-900", "gray-100", "gray-1000", "gray-200", "gray-25", "gray-300", "gray-400", "gray-50", "gray-500", "gray-600", "gray-700", "gray-75", "gray-800", "gray-900", "GrayText", "green-100", "green-1000", "green-1100", "green-1200", "green-1300", "green-1400", "green-1500", "green-1600", "green-200", "green-300", "green-400", "green-500", "green-600", "green-700", "green-800", "green-900", "Highlight", "HighlightText", "indigo-100", "indigo-1000", "indigo-1100", "indigo-1200", "indigo-1300", "indigo-1400", "indigo-1500", "indigo-1600", "indigo-200", "indigo-300", "indigo-400", "indigo-500", "indigo-600", "indigo-700", "indigo-800", "indigo-900", "informative-100", "informative-1000", "informative-1100", "informative-1200", "informative-1300", "informative-1400", "informative-1500", "informative-1600", "informative-200", "informative-300", "informative-400", "informative-500", "informative-600", "informative-700", "informative-800", "informative-900", "LinkText", "magenta-100", "magenta-1000", "magenta-1100", "magenta-1200", "magenta-1300", "magenta-1400", "magenta-1500", "magenta-1600", "magenta-200", "magenta-300", "magenta-400", "magenta-500", "magenta-600", "magenta-700", "magenta-800", "magenta-900", "Mark", "negative-100", "negative-1000", "negative-1100", "negative-1200", "negative-1300", "negative-1400", "negative-1500", "negative-1600", "negative-200", "negative-300", "negative-400", "negative-500", "negative-600", "negative-700", "negative-800", "negative-900", "notice-100", "notice-1000", "notice-1100", "notice-1200", "notice-1300", "notice-1400", "notice-1500", "notice-1600", "notice-200", "notice-300", "notice-400", "notice-500", "notice-600", "notice-700", "notice-800", "notice-900", "orange-100", "orange-1000", "orange-1100", "orange-1200", "orange-1300", "orange-1400", "orange-1500", "orange-1600", "orange-200", "orange-300", "orange-400", "orange-500", "orange-600", "orange-700", "orange-800", "orange-900", "pink-100", "pink-1000", "pink-1100", "pink-1200", "pink-1300", "pink-1400", "pink-1500", "pink-1600", "pink-200", "pink-300", "pink-400", "pink-500", "pink-600", "pink-700", "pink-800", "pink-900", "positive-100", "positive-1000", "positive-1100", "positive-1200", "positive-1300", "positive-1400", "positive-1500", "positive-1600", "positive-200", "positive-300", "positive-400", "positive-500", "positive-600", "positive-700", "positive-800", "positive-900", "purple-100", "purple-1000", "purple-1100", "purple-1200", "purple-1300", "purple-1400", "purple-1500", "purple-1600", "purple-200", "purple-300", "purple-400", "purple-500", "purple-600", "purple-700", "purple-800", "purple-900", "red-100", "red-1000", "red-1100", "red-1200", "red-1300", "red-1400", "red-1500", "red-1600", "red-200", "red-300", "red-400", "red-500", "red-600", "red-700", "red-800", "red-900", "seafoam-100", "seafoam-1000", "seafoam-1100", "seafoam-1200", "seafoam-1300", "seafoam-1400", "seafoam-1500", "seafoam-1600", "seafoam-200", "seafoam-300", "seafoam-400", "seafoam-500", "seafoam-600", "seafoam-700", "seafoam-800", "seafoam-900", "silver-100", "silver-1000", "silver-1100", "silver-1200", "silver-1300", "silver-1400", "silver-1500", "silver-1600", "silver-200", "silver-300", "silver-400", "silver-500", "silver-600", "silver-700", "silver-800", "silver-900", "transparent", "transparent-black-100", "transparent-black-1000", "transparent-black-200", "transparent-black-25", "transparent-black-300", "transparent-black-400", "transparent-black-50", "transparent-black-500", "transparent-black-600", "transparent-black-700", "transparent-black-75", "transparent-black-800", "transparent-black-900", "transparent-overlay-100", "transparent-overlay-1000", "transparent-overlay-200", "transparent-overlay-25", "transparent-overlay-300", "transparent-overlay-400", "transparent-overlay-50", "transparent-overlay-500", "transparent-overlay-600", "transparent-overlay-700", "transparent-overlay-75", "transparent-overlay-800", "transparent-overlay-900", "transparent-white-100", "transparent-white-1000", "transparent-white-200", "transparent-white-25", "transparent-white-300", "transparent-white-400", "transparent-white-50", "transparent-white-500", "transparent-white-600", "transparent-white-700", "transparent-white-75", "transparent-white-800", "transparent-white-900", "turquoise-100", "turquoise-1000", "turquoise-1100", "turquoise-1200", "turquoise-1300", "turquoise-1400", "turquoise-1500", "turquoise-1600", "turquoise-200", "turquoise-300", "turquoise-400", "turquoise-500", "turquoise-600", "turquoise-700", "turquoise-800", "turquoise-900", "white", "yellow-100", "yellow-1000", "yellow-1100", "yellow-1200", "yellow-1300", "yellow-1400", "yellow-1500", "yellow-1600", "yellow-200", "yellow-300", "yellow-400", "yellow-500", "yellow-600", "yellow-700", "yellow-800", "yellow-900" ], "additionalTypes":[ ] }Example tool call:
Response
{ "values":[ "text-to-control", "text-to-visual", "edge-to-text", "pill", "0", "2", "4", "8", "12", "16", "20", "24", "28", "32", "36", "40", "44", "48", "56", "64", "80", "96" ], "additionalTypes":[ "baseSpacing", "LengthPercentage" ] }In the future, we may want to add a "compact" mode, since some of these can be pretty verbose. We could use
red-{100...900}etc. instead of listing every value. That would take some more planning, so I think what we have here is better than nothing.✅ Pull Request Checklist:
📝 Test Instructions:
Build locally:
Then start the local server:
{ "mcpServers": { "React Spectrum (S2)": { "command": "node", "args": [ "{your path}/react-spectrum/packages/dev/mcp/s2/dist/s2/src/index.js" ] }, } }🧢 Your Project: