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

2 participants