Repository navigation
feat(server): accept icons in registerAppTool's tool config - #813
Open
naivedhya27-cmyk wants to merge 1 commit into
Open
naivedhya27-cmyk wants to merge 1 commit into
naivedhya27-cmyk wants to merge 1 commit into
Conversation
MCP 2025-11-25 tools can carry `icons`, and the SDK's `registerTool` config accepts them, but `ToolConfig` (and so `McpUiAppToolConfig`) left the field out. TypeScript rejected `icons` in `registerAppTool(...)` although the runtime already spreads the config into `registerTool`, so an app tool could not have an icon without a cast or a fallback to `registerTool`. Adds `icons?: Icon[]` to `ToolConfig`, with a test that the icons reach `tools/list`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
MCP 2025-11-25 lets a tool carry
icons, and the SDK'sregisterToolconfig accepts them.ToolConfig(and soMcpUiAppToolConfig) left the field out, so TypeScript rejectsiconsinregisterAppTool(...):The runtime already spreads the config into
registerTool, so only the type blocked it. App tools are the ones a host shows most prominently, yet they were the only tools that could not have an icon without a cast or a fallback toserver.registerTool.Changes
icons?: Icon[]onToolConfig, using the SDK's ownIcontype.tools/listthrough a real client.Testing
tsc, the build's type check: the new test does not compile without the field, and does with it.bun test src/server: 16 pass.bun test src examples: 350 pass; the one failure and one error are the same onmainin a checkout withoutnpm run build(the pdf-server example cannot resolve@modelcontextprotocol/ext-apps/server).prettier --checkon the changed files: clean.Found while building an Alexa+ add-on with Echo Show cards, where every tool has its own icon.
🤖 Generated with Claude Code