feat: add ability to detect changed tools for dynamic configs - #13
Merged
Merged
Conversation
If we are using a dynamic config that is provided for each request, then we have to track the tool list so that we can send notifications when the list changes. For stateless connections, the "embedding server" must pass a configID for tracking. Signed-off-by: Donnie Adams <donnie@obot.ai>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is synchronized, lifecycle-aware, documented, and covered by focused integration tests.
Pull request overview
Adds configuration-scoped tool-change detection and notifications for dynamic stateless requests.
Changes:
- Introduces context-based configuration IDs.
- Tracks tool snapshots and notifies active subscribers when tools change.
- Adds lifecycle and protocol-level tests plus usage documentation.
File summaries
| File | Description |
|---|---|
README.md |
Documents configuration IDs and notification behavior. |
context.go |
Adds configuration ID context helpers. |
composite.go |
Connects notification tracking to frontend middleware. |
handler.go |
Detects tool-list changes per request. |
notifications.go |
Manages configuration-scoped subscribers and snapshots. |
notifications_test.go |
Tests subscription cleanup. |
http_tool_changes_test.go |
Tests notifications across protocol versions. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
njhale
approved these changes
Sep 10, 2026
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.
If we are using a dynamic config that is provided for each request, then we have to track the tool list so that we can send notifications when the list changes.
For stateless connections, the "embedding server" must pass a configID for tracking.