fix(mcpb): default bundle tools to empty array when omitted#791
Open
syf2211 wants to merge 1 commit into
Open
Conversation
Bundles without a tools key produced a serverCard with only serverInfo, which the Smithery registry rejects with "No values to set". Default to an empty tools array so stdio bundles can publish without manifest edits. Fixes smithery-ai#770
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
When publishing a
.mcpbbundle whose manifest omits thetoolskey,getBundleDeployPayloadproduced aserverCardwith onlyserverInfo. The Smithery registry rejects that payload with400 {"error":"No values to set"}.This change always includes
toolsin the deploy payload, defaulting to an empty array when the manifest does not declare tools.Motivation
Fixes #770. Users reported publish failures for valid stdio bundles unless they manually edited
manifest.jsonto add"tools": []. Issue comments traced the root cause to conditional spreading ingetBundleDeployPayload.Changes
serverCard.toolsto[]whenmanifest.toolsis omittedtoolsmanifest valuesTests
pnpm test src/lib/__tests__/mcpb/get-bundle-deploy-payload.test.ts— 2 passedpnpm test— 399 passedpnpm run check— passedpnpm run typecheck— passedNotes
tools: []in the manifest behaves the same as beforepromptsandresourcesremain optional; onlytoolsneeded defaulting for the reported registry validation error