-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: enhance dynamic tool management with notifications and enable/disable #1429
Copy link
Copy link
Open
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implementIssue is actionable, needs maintainer decision on whether to implementv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Metadata
Metadata
Assignees
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implementIssue is actionable, needs maintainer decision on whether to implementv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Summary
Enhance the Python SDK's dynamic tool management capabilities to match the TypeScript SDK by adding:
tools/list_changednotifications when tools are added/removedBackground
The Python SDK currently supports adding and removing tools dynamically (see #1322), but lacks two key features present in the TypeScript SDK:
1. List Changed Notifications
The TypeScript SDK automatically sends
notifications/tools/list_changedwhen tools are modified. This allows clients to know when they should refresh their tool list.Python SDK gap: Currently, when calling
add_tool()orremove_tool(), clients are not notified of the change and may show stale tool lists.2. Enable/Disable Tools
The TypeScript SDK provides
enable()anddisable()methods on tools:Benefits:
Python SDK gap: Only permanent removal via
remove_tool()is supported. No way to temporarily disable/re-enable tools.References
remove_toolmethod)notifications/tools/list_changed