René's URL Explorer Experiment


Title: Feature/add enable disable methods tools by davila7 · Pull Request #728 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Feature/add enable disable methods tools by davila7 · Pull Request #728 · modelcontextprotocol/python-sdk

X Title: Feature/add enable disable methods tools by davila7 · Pull Request #728 · modelcontextprotocol/python-sdk

Description: Added the ability to dynamically enable and disable tools at runtime with client notifications. Motivation and Context This change allows developers to temporarily restrict access to specific tools without removing them from the tool manager. This is useful for implementing feature flags, managing resource availability, or controlling access to functionality based on runtime conditions. How Has This Been Tested? Added unit tests for enabling/disabling tools Verified that disabled tools don't appear in tool listings and cannot be called Tested re-enabling previously disabled tools Breaking Changes The tool list now includes the enabled state of each tool. However, all tools are initialized with enabled=True by default, maintaining backward compatibility with existing code. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the MCP Documentation My code follows the repository's style guidelines New and existing tests pass locally I have added appropriate error handling I have added or updated documentation as needed

Open Graph Description: Added the ability to dynamically enable and disable tools at runtime with client notifications. Motivation and Context This change allows developers to temporarily restrict access to specific tools...

X Description: Added the ability to dynamically enable and disable tools at runtime with client notifications. Motivation and Context This change allows developers to temporarily restrict access to specific tools...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/728

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a334a694-d367-7755-21be-b1156d6011e6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBAE8:FE488:210ED11:2B8F698:6B0575E8
html-safe-nonce6402cd6698113b88fd3916b9f9ed1dc7f95cd5bd95a310c6c2a1d0d967c3f482
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUU4OkZFNDg4OjIxMEVEMTE6MkI4RjY5ODo2QjA1NzVFOCIsInZpc2l0b3JfaWQiOiI3NjQwODU1MTE0Njg0OTIxMzIwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6006fed5fcc8ec47d40ed64d5253972b466be5322b6200b3181e5e94f13dd4b4
hovercard-subject-tagpull_request:2523306858
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/728/files
twitter:imagehttps://avatars.githubusercontent.com/u/6216945?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/6216945?s=400&v=4
og:image:altAdded the ability to dynamically enable and disable tools at runtime with client notifications. Motivation and Context This change allows developers to temporarily restrict access to specific tools...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None507b2d62524c0f595c35a2a2ee8a6ec54b119f245b3c59eaa070013b70ed1ada
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee7a883ae3b439b8952652eaa7803e2587f30e339
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/728/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F728%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F728%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues320 (320)https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://github.com/modelcontextprotocol/python-sdk/security
Insightshttps://github.com/modelcontextprotocol/python-sdk/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
davila7https://github.com/davila7
modelcontextprotocol:mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
davila7:feature/add-enable-disable-methods-toolshttps://github.com/davila7/mcp-python-sdk/tree/feature/add-enable-disable-methods-tools
Conversation 11 https://github.com/modelcontextprotocol/python-sdk/pull/728
Commits 5 https://github.com/modelcontextprotocol/python-sdk/pull/728/commits
Checks 0 https://github.com/modelcontextprotocol/python-sdk/pull/728/checks
Files changed https://github.com/modelcontextprotocol/python-sdk/pull/728/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/728/files
Feature/add enable disable methods tools https://github.com/modelcontextprotocol/python-sdk/pull/728/files#top
Show all changes 5 commits https://github.com/modelcontextprotocol/python-sdk/pull/728/files
7a6dfa7 Add tool enable/disable functionality with client notifications davila7 May 15, 2025 https://github.com/modelcontextprotocol/python-sdk/pull/728/commits/7a6dfa717663c203feeafe6ba8dd00e9e3db8efc
9b0f904 add enable and disable tool functionality to README davila7 May 15, 2025 https://github.com/modelcontextprotocol/python-sdk/pull/728/commits/9b0f9041a7e4e1d1ec7f53fe4def2c7d73539135
1a83c14 Fix spaces in README.md davila7 May 16, 2025 https://github.com/modelcontextprotocol/python-sdk/pull/728/commits/1a83c14aac0e1e02911622feb5871a12bfba1fbb
d098cd9 fix function disable_tool and enable_tool. Pytest executed successfully davila7 May 16, 2025 https://github.com/modelcontextprotocol/python-sdk/pull/728/commits/d098cd9565e04ad8f38de35732de5f5178bcc415
6b098e4 Add tests for enabling, disabling, and filtering tools in ToolManager davila7 Jul 10, 2025 https://github.com/modelcontextprotocol/python-sdk/pull/728/commits/6b098e4b23c5a0a2a4dc9bffb095ef2a4c7088a5
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/728/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/728/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/728/files
README.md https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
session_group.py https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-cbe797d477654047e3091f5e3c0a1046d9197e34ed55d884c7d957ef4e61d775
base.py https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-69c6a7ada93ce277ad1ae8f79a6800160e437084559ca0a24255851cb061a3a1
tool_manager.py https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-d9f49c4155cf42f7f146266f7f51294f25359fd25241f6495ded5fa4c8718424
test_tool_manager.py https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b5b4bbafe34c06e716812137f400c45d7e1a454cce6f39f69a71b3e9cb4c1975
README.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
View file https://github.com/davila7/mcp-python-sdk/blob/6b098e4b23c5a0a2a4dc9bffb095ef2a4c7088a5/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/728/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
src/mcp/client/session_group.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-cbe797d477654047e3091f5e3c0a1046d9197e34ed55d884c7d957ef4e61d775
View file https://github.com/davila7/mcp-python-sdk/blob/6b098e4b23c5a0a2a4dc9bffb095ef2a4c7088a5/src/mcp/client/session_group.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/728/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-cbe797d477654047e3091f5e3c0a1046d9197e34ed55d884c7d957ef4e61d775
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-cbe797d477654047e3091f5e3c0a1046d9197e34ed55d884c7d957ef4e61d775
src/mcp/server/fastmcp/tools/base.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-69c6a7ada93ce277ad1ae8f79a6800160e437084559ca0a24255851cb061a3a1
View file https://github.com/davila7/mcp-python-sdk/blob/6b098e4b23c5a0a2a4dc9bffb095ef2a4c7088a5/src/mcp/server/fastmcp/tools/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/728/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-69c6a7ada93ce277ad1ae8f79a6800160e437084559ca0a24255851cb061a3a1
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-69c6a7ada93ce277ad1ae8f79a6800160e437084559ca0a24255851cb061a3a1
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-69c6a7ada93ce277ad1ae8f79a6800160e437084559ca0a24255851cb061a3a1
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-69c6a7ada93ce277ad1ae8f79a6800160e437084559ca0a24255851cb061a3a1
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-69c6a7ada93ce277ad1ae8f79a6800160e437084559ca0a24255851cb061a3a1
src/mcp/server/fastmcp/tools/tool_manager.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-d9f49c4155cf42f7f146266f7f51294f25359fd25241f6495ded5fa4c8718424
View file https://github.com/davila7/mcp-python-sdk/blob/6b098e4b23c5a0a2a4dc9bffb095ef2a4c7088a5/src/mcp/server/fastmcp/tools/tool_manager.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/728/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-d9f49c4155cf42f7f146266f7f51294f25359fd25241f6495ded5fa4c8718424
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-d9f49c4155cf42f7f146266f7f51294f25359fd25241f6495ded5fa4c8718424
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-d9f49c4155cf42f7f146266f7f51294f25359fd25241f6495ded5fa4c8718424
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/728/files
tests/server/fastmcp/test_tool_manager.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b5b4bbafe34c06e716812137f400c45d7e1a454cce6f39f69a71b3e9cb4c1975
View file https://github.com/davila7/mcp-python-sdk/blob/6b098e4b23c5a0a2a4dc9bffb095ef2a4c7088a5/tests/server/fastmcp/test_tool_manager.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/728/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/728/files#diff-b5b4bbafe34c06e716812137f400c45d7e1a454cce6f39f69a71b3e9cb4c1975
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.