Conversation
Surfaces the connector icon as the per-tool badge in clients that read tool.icons[] (Claude Desktop, etc.). Same 512x512 PNG inlined as data: URI so the wire response is self-contained with no external host dependency. Path B: SDK 1.29.0 (latest) does not expose icons in registerTool, so we intercept the tools/list handler after all register* calls and inject icons[] into each tool entry via the SDK's _requestHandlers map.
Spec example uses 48x48 for tool icons. Add a small 48x48 PNG alongside the 512x512 connector icon. Per-tool icons[] now declares both sizes so clients can pick the right one for the slot. Generated via sips from the source 512x512 icon.
Tool badges are small (48px). The 512×512 was redundant — that size is the connector-level icon (manifest.json 'icon: icon.png'), already served separately. Simpler bundle script + smaller tools/list payload.
Dev-vlad
added a commit
that referenced
this pull request
May 5, 2026
Three commits landed on main after v0.2.0 published to npm at bc4ac23: - de7645a (registerTool migration with explicit titles) - ab91a9a (square 512×512 connector icon) - 76720cf..67a0b9d (per-tool icons[] in tools/list — PR #7) Tag v0.2.1 was previously pushed at 97b297f but the publish workflow failed because package.json/manifest.json still said 0.2.0. This commit: - Bumps package.json + manifest.json to 0.2.1. - Splits the changelog so the v0.2.0 entry reflects what's actually on npm at v0.2.0, and a new v0.2.1 entry covers the three post-publish additions. After merge, retag v0.2.1 at the new HEAD to fire publish.yml.
2 tasks
Dev-vlad
added a commit
that referenced
this pull request
May 5, 2026
* changelog: sync with v0.2.0 actual scope Original entry was written from the spec; missed several changes that landed during execution: registerTool migration with explicit titles, server.prompt(...) runtime registration, per-tool icons[] in tools/list, square 512×512 connector icon, language format correction (ISO 639-1 not 639-2), toolError body propagation, and the prompts[] manifest schema fix. Drops the "new square icon" deferred line — that did ship. * Bump to 0.2.1 + split changelog v0.2.0/v0.2.1 Three commits landed on main after v0.2.0 published to npm at bc4ac23: - de7645a (registerTool migration with explicit titles) - ab91a9a (square 512×512 connector icon) - 76720cf..67a0b9d (per-tool icons[] in tools/list — PR #7) Tag v0.2.1 was previously pushed at 97b297f but the publish workflow failed because package.json/manifest.json still said 0.2.0. This commit: - Bumps package.json + manifest.json to 0.2.1. - Splits the changelog so the v0.2.0 entry reflects what's actually on npm at v0.2.0, and a new v0.2.1 entry covers the three post-publish additions. After merge, retag v0.2.1 at the new HEAD to fire publish.yml.
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
icon.pngas a base64data:image/png;base64,...URI at build time via a newscripts/bundle-icon.mjsscript (mirrors the existingbundle-resources.mjspattern), writingsrc/icon-bundled.ts(gitignored, regenerated on every build/test/typecheck).src/tool-icons.tswith aTOOL_ICONSmap assigning the same icon entry to all four tools (web_fetch,web_search,ai_chat_completion,account_status).iconsfromregisterToolconfig, so Path B is used: after allregister*calls, the SDK's internaltools/listhandler is captured from_requestHandlersand wrapped to injecticons[]onto every tool in the response.tests/tool-icons.test.tsverifying all 4 tools carryiconswithmimeType: "image/png"and adata:image/png;base64,src.Test plan
npm run lint— cleannpm run typecheck— cleannpm test— 109 tests pass (108 existing + 1 new)npm run build— clean ESM + DTS outputnpm run build:mcpb— fresh MCPB produced