Skip to content

Conversation

@domdomegg
Copy link
Member

@domdomegg domdomegg commented Sep 29, 2025

Mainly to fix failing CI checks on main


Summary

Updates the Icon.sizes property from string to string[] to match the MCP specification.

The spec defines sizes as an array of strings (e.g., ["48x48", "96x96"] or ["any"]) rather than a single string. This change:

  • Updates the IconSchema in src/types.ts to use z.array(z.string()) instead of z.string()
  • Updates documentation to match the spec
  • Fixes the example usage in simpleStreamableHttp.ts

This resolves type compatibility issues with the spec and allows icons to properly specify multiple size variants.

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.
Copy link
Contributor

@felixweinberger felixweinberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domdomegg domdomegg merged commit 7d29cee into main Sep 29, 2025
5 checks passed
@domdomegg domdomegg deleted the adamj/fix-icon-sizes-type branch September 29, 2025 18:40
@felixweinberger
Copy link
Contributor

felixweinberger commented Sep 29, 2025

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.

@felixweinberger felixweinberger added the improves spec compliance When a change improves ability of SDK users to comply with spec definition label Sep 29, 2025
SVLaursen pushed a commit to SVLaursen/typescript-sdk that referenced this pull request Oct 7, 2025
@ulasbilgen
Copy link

ulasbilgen commented Nov 22, 2025

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?

@domdomegg
Copy link
Member Author

@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.

@felixweinberger
Copy link
Contributor

@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.

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?

@ulasbilgen Thanks for reporting this. This change was intentional to align with the MCP specification, which defines sizes as an array of strings (e.g., ["48x48", "96x96"]). This was originally implemented as a string incorrectly, making this a bug-fix to comply with the spec.

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 sizes as an array instead of a string.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improves spec compliance When a change improves ability of SDK users to comply with spec definition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants