Implement domain-namespaced tool registry for MCP server#1789
Merged
fderuiter merged 1 commit intoJul 23, 2026
Merged
Conversation
…ation logic, and unit tests
fderuiter
deleted the
jules/domain-namespaced-tools-js1-ad387dc1-91fd-4cd1-ade1-d6ec9a5123ef
branch
July 23, 2026 14:48
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.
Why This Change Is Necessary
Previously, the MCP server registered all prompts, workflows, and skills into a single flat list. In enterprise AI applications, this lack of segregation poses severe operational and safety risks:
data_validationworkflow in both the business and clinical domains), the server would experience collisions and registration overwrites.By introducing domain-namespacing (e.g.,
clinical__breast_cancer_trialandbusiness__data_validation), we enable enterprise AI architects to dynamically route and isolate tools using simple prefix filtering (e.g., matching onlyclinical__*for medical assistants).Key Decisions & Technical Implementation
1. Dynamic Domain & Category Extraction
2. Domain Prefixing and Sanitization
[domain]__[tool_name].__) delimiter, ensuring that standard sanitization does not collapse this critical namespace boundary.3. MCP Protocol-Compliant Truncation
4. Execution Pipeline Resolution
get_tool_name_mcpduring the discovery phase.Verification and Testing
tests/test_utils.pyto match namespaced behavior.test_namespaced_tool_registry_and_truncationto verify domain-namespacing, long name truncation, unique hash generation, name collision avoidance across domains, and explicit domain override metadata.