Omit icon sizes field for backward compatibility with older MCP clients#1645
Merged
SamMorrowDrums merged 2 commits intomainfrom Dec 18, 2025
Merged
Omit icon sizes field for backward compatibility with older MCP clients#1645SamMorrowDrums merged 2 commits intomainfrom
SamMorrowDrums merged 2 commits intomainfrom
Conversation
- Remove Sizes field from octicons.Icons() to fix compatibility with older MCP clients - Older clients like Cursor expect sizes to be a string, not an array - The 2025-11-25 MCP spec changed sizes from string to array - Omitting the optional Sizes field makes icons compatible with all clients - Update tests and toolsnaps to reflect the change Fixes #1644 Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add SDK version recording in initialize process
Omit icon sizes field for backward compatibility with older MCP clients
Dec 18, 2025
SamMorrowDrums
approved these changes
Dec 18, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the sizes field from icon definitions to maintain backward compatibility with older MCP clients. The MCP spec changed on 2025-11-25 from requiring Icon.sizes as a string to an array format. Since the SDK now uses the array format but older clients like Cursor v2.2.36 still expect a string, omitting this optional field prevents schema validation errors during initialization while maintaining icon functionality through the source and mimeType fields.
Key Changes
- Removed
Sizesfield assignment inocticons.Icons()function - Updated tests to verify the
Sizesfield remains empty - Regenerated toolsnaps for the 5 tools with explicit icons
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/octicons/octicons.go | Removed Sizes field assignments from both light and dark icon variants in the Icons() function; added documentation explaining the backward compatibility rationale |
| pkg/octicons/octicons_test.go | Updated test assertions to verify Sizes field is empty using assert.Empty() with clarifying comments |
| pkg/github/toolsnaps/assign_copilot_to_issue.snap | Removed sizes array from icon definitions in tool schema snapshot |
| pkg/github/toolsnaps/fork_repository.snap | Removed sizes array from icon definitions in tool schema snapshot |
| pkg/github/toolsnaps/merge_pull_request.snap | Removed sizes array from icon definitions in tool schema snapshot |
| pkg/github/toolsnaps/request_copilot_review.snap | Removed sizes array from icon definitions in tool schema snapshot |
| pkg/github/toolsnaps/star_repository.snap | Removed sizes array from icon definitions in tool schema snapshot |
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
Removes the
sizesfield from icon definitions to fix connection failures with older MCP clients that expect a string instead of an array.Why
The 2025-11-25 MCP spec changed
Icon.sizesfrom a string to an array. The server uses SDK v1.2.0-pre.1 which implements the array format, but clients like Cursor v2.2.36 still expect a string, causing schema validation errors during initialization.What changed
Sizesfield inocticons.Icons()functionMCP impact
Tools with icons now omit the
sizesfield. Icons remain functional viasource(data URI) andmimeTypefields.Prompts tested (tool changes only)
Not applicable - change affects icon metadata only, not tool functionality.
Security / limits
Lint & tests
./script/lint./script/testDocs
Icon field is internal metadata; no user-facing documentation required.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.