Fix multi-source documentation tool schemas - #338
Conversation
🦋 Changeset detectedLatest commit: 8c9bd60 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for storybook-mcp-self-host-example canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe handler now derives a ChangesMulti-source documentation tool wiring
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi, gentle follow-up after a couple of weeks. This is still ready on my side; happy to adjust or close if it is not aligned with the project direction. |
Summary
Fixes #213.
When
createStorybookMcpHandleris created with multiple handler-levelsources, it already forwards those sources into the request context, but the two single-documentation tools were still registered with their single-source schemas. That meantstorybookIdwas missing fromtools/listand clients could not pass the source selector through.This change derives
multiSourcefrom handler-level sources and passes it intoaddGetStoryDocumentationToolandaddGetDocumentationTool, so both schemas include the requiredstorybookIdfield for multi-source handlers.Verification
Summary by CodeRabbit
storybookIdis required when more than one source is configured.get-documentationandget-documentation-for-storyinclude thestorybookIdproperty and mark it as required in multi-source mode.