Add tool definitions annotation support to registry server - #414
Merged
Conversation
Signed-off-by: lujunsan <luisjuncaldev@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #414 +/- ##
==========================================
+ Coverage 61.08% 61.17% +0.09%
==========================================
Files 81 81
Lines 7426 7444 +18
==========================================
+ Hits 4536 4554 +18
Misses 2582 2582
Partials 308 308 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lujunsan
marked this pull request as ready for review
January 27, 2026 14:44
blkt
approved these changes
Jan 27, 2026
rdimitrov
approved these changes
Jan 28, 2026
4 tasks
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.
Adds support for the
toolhive.stacklok.dev/tool-definitionsannotation to the registry server, allowing MCP server publishers to declare custom tool definitions that are exposed through the registry API.This implements the registry-server side of RFC-0015.
Changes
defaultRegistryToolDefinitionsAnnotationconstant for the tool definitions annotationextractToolDefinitions()helper function to parse and validate tool definitionsextractServer()(MCPServer)extractVirtualMCPServer()(VirtualMCPServer)extractMCPRemoteProxy()(MCPRemoteProxy)_meta.publisher-provided.<url>.tool_definitionsTechnical Details
The registry server reads the
toolhive.stacklok.dev/tool-definitionsannotation from Kubernetes MCP resources and:The implementation does NOT validate the tool definition schema itself, as that is the operator's responsibility during reconciliation.
Testing
Related