-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: change Icon.sizes from string to string[] #981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updates the Icon schema to match the MCP specification, which defines sizes as an array of strings rather than a single string. This allows icons to specify multiple size variants (e.g., ["48x48", "96x96"]). Also updates the example usage in simpleStreamableHttp.ts to use the new array format.
felixweinberger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matches modelcontextprotocol/python-sdk#1411, thanks!
|
Note for Thursday release review: I believe this is technically a breaking change, so we'll probably need to do a minor version bump here. Given we're improving spec compliance and this is part of a draft spec, I believe we don't need to do anything more significant than that. |
|
This fix is breaking Figma-Desktop MCP server loading with the SDK. I sent a feedback to Figma team but maybe it might be better to keep backward compatibility? |
|
@felixweinberger what do we want to do about ulasbilgen's comment above? Not sure what the standard protocol is for these kind of TS changes. |
@ulasbilgen Thanks for reporting this. This change was intentional to align with the MCP specification, which defines Since this is part of the draft spec, we're keeping the strict typing to match it rather than add backwards compatibility for an initially incorrect implementation. The Figma server will need to update their implementation to pass If you've already reported this to the Figma team, they should be able to make the fix on their end. The change is straightforward - just wrap the size value in an array. @knguyen-figma / @cokun-figma would you be able to take a look or route to the right person to address this? |
Mainly to fix failing CI checks on main
Summary
Updates the
Icon.sizesproperty fromstringtostring[]to match the MCP specification.The spec defines
sizesas an array of strings (e.g.,["48x48", "96x96"]or["any"]) rather than a single string. This change:IconSchemainsrc/types.tsto usez.array(z.string())instead ofz.string()simpleStreamableHttp.tsThis resolves type compatibility issues with the spec and allows icons to properly specify multiple size variants.