Title: feat: enhance dynamic tool management with notifications and enable/disable · Issue #1429 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: feat: enhance dynamic tool management with notifications and enable/disable · Issue #1429 · modelcontextprotocol/python-sdk
X Title: feat: enhance dynamic tool management with notifications and enable/disable · Issue #1429 · modelcontextprotocol/python-sdk
Description: Summary Enhance the Python SDK's dynamic tool management capabilities to match the TypeScript SDK by adding: Automatic tools/list_changed notifications when tools are added/removed Tool enable/disable functionality (temporary hiding with...
Open Graph Description: Summary Enhance the Python SDK's dynamic tool management capabilities to match the TypeScript SDK by adding: Automatic tools/list_changed notifications when tools are added/removed Tool enable/disa...
X Description: Summary Enhance the Python SDK's dynamic tool management capabilities to match the TypeScript SDK by adding: Automatic tools/list_changed notifications when tools are added/removed Tool enable/...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/1429
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: enhance dynamic tool management with notifications and enable/disable","articleBody":"## Summary\n\nEnhance the Python SDK's dynamic tool management capabilities to match the TypeScript SDK by adding:\n1. Automatic `tools/list_changed` notifications when tools are added/removed\n2. Tool enable/disable functionality (temporary hiding without removal)\n\n## Background\n\nThe Python SDK currently supports adding and removing tools dynamically (see #1322), but lacks two key features present in the TypeScript SDK:\n\n### 1. List Changed Notifications\n\nThe TypeScript SDK automatically sends `notifications/tools/list_changed` when tools are modified. This allows clients to know when they should refresh their tool list.\n\n**Python SDK gap:** Currently, when calling `add_tool()` or `remove_tool()`, clients are not notified of the change and may show stale tool lists.\n\n### 2. Enable/Disable Tools\n\nThe TypeScript SDK provides `enable()` and `disable()` methods on tools:\n```typescript\nconst tool = server.tool(\"myTool\", ..., async () => { ... });\ntool.disable() // Hides from list_tools, blocks calls\ntool.enable() // Re-enables the tool\ntool.remove() // Permanently removes\n```\n\n**Benefits:**\n- Temporarily hide tools without losing registration\n- Re-enable tools without re-registering\n- Useful for permission-based or state-based tool visibility\n\n**Python SDK gap:** Only permanent removal via `remove_tool()` is supported. No way to temporarily disable/re-enable tools.\n\n## References\n\n- Related PR: #1322 (adds `remove_tool` method)\n- TypeScript SDK Dynamic Servers: https://github.com/modelcontextprotocol/typescript-sdk#dynamic-servers\n- MCP spec supports `notifications/tools/list_changed`","author":{"url":"https://github.com/maxisbey","@type":"Person","name":"maxisbey"},"datePublished":"2025-10-06T13:13:00Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/1429"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4e8394c3-1ee9-b5af-5f92-c8276abd2dba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D70A:D410B:2B85AE7:390CD1C:6B056538 |
| html-safe-nonce | 9f6501fbdf31f9684f170b82be8898105e94a8e9ec516cb54640ccd2b4ae120b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzBBOkQ0MTBCOjJCODVBRTc6MzkwQ0QxQzo2QjA1NjUzOCIsInZpc2l0b3JfaWQiOiIxNDc2Nzc3NjI2OTU3MDc5ODY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7c2cdc13ec71f0c5352b8d6b502c3b9a33d10bd64ca97dece7bca71274a1bbdb |
| hovercard-subject-tag | issue:3487232794 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/1429/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e6343c9603581afc572d061515f3879a2b478129efd012059ef91f30e6e554f/modelcontextprotocol/python-sdk/issues/1429 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e6343c9603581afc572d061515f3879a2b478129efd012059ef91f30e6e554f/modelcontextprotocol/python-sdk/issues/1429 |
| og:image:alt | Summary Enhance the Python SDK's dynamic tool management capabilities to match the TypeScript SDK by adding: Automatic tools/list_changed notifications when tools are added/removed Tool enable/disa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maxisbey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1be5cc09efdd4833c24a4ffa71d698e3999fa09071e159fe14c2c08e41c98331 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f6d69234e682c947a48074340e69d45d5901de31 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width