Repository navigation
feat(mcp): resources/list enumeration, argument completion, swap notifications - #410
Merged
Merged
Conversation
…fications
Close the three MCP capability gaps found in the protocol audit:
- bizard://tutorial/{chartId} now lists one resource per chart in
resources/list and autocompletes chartId via completion/complete
(case-insensitive, spec-capped at 100 values).
- adapt/troubleshoot prompt chartId arguments autocomplete from the
live bundle via the SDK completable() wrapper; degraded mode yields
no suggestions instead of erroring.
- A mid-session bundle hot-swap now fires
notifications/resources/list_changed (fire-and-forget, silent when
unconnected); the swap trigger is injectable for hosts/tests.
Docs updated (mcp/README.md, Skills EN/zh); 15 new tests; coverage
89.5% -> 93.9% statements. Verified end-to-end on the built binary:
capabilities advertise completions + resources.listChanged,
resources/list returns 818 URIs, completion/complete resolves ids.
Contributor
✅ QMD Format CheckNo new QMD tutorial files to check. |
Contributor
📊 Quarto Render PreviewThe new or modified Quarto files have been rendered and are available as artifacts. 🔗 View and Download Rendered Files Click the link above, scroll to the "Artifacts" section at the bottom of the page, and download Modified files: |
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
Protocol audit against the MCP specification found three capability gaps in bizard-mcp; this PR closes all three, test-first.
bizard://tutorial/{chartId}registered withlist: undefined, so clients could not discover tutorial URIs viaresources/list. Now every chart in the live bundle enumerates asbizard://tutorial/{chartId}with per-item name/title/description.adapt/troubleshootpromptchartIdarguments (and the tutorial template'schartIdvariable) now autocomplete viacompletion/complete, case-insensitive against the catalog, capped at the spec's 100-value limit. Degraded mode (no snapshot) yields empty suggestions instead of errors. Implemented with the SDK'scompletable()helper (present since 1.12.0, our declared floor — no bump needed).notifications/resources/list_changed(silent no-op when unconnected — SDK guard verified). The swap trigger is injectable viastartUpdateCheckso hosts/tests can fire swaps manually.Verification
test/resources.test.ts,test/prompts.test.ts,test/entry.test.ts; suite 88 → 104, all greencompletions: {}+resources.listChanged: true;resources/listreturns 818 URIs;completion/completeon the adapt prompt resolves085-half-violin-637… for query violmcp/README.md,Skills.qmd,Skills.zh.qmdTest plan
npm test— 104/104npm run coverage— 93.9% statements (≥ 80% gate)npm run build+ stdio smoke ofdist/index.js(initialize → resources/list → completion/complete)🤖 Generated with Claude Code