feat: add /mcp/tools.json endpoint - #2
Merged
Merged
Conversation
- Add GET /mcp/tools.json that returns all tool names and descriptions - Expose tool_router with pub(crate) visibility via macro option - Add tools::list_tools() public helper backed by ToolRouter::list_all() - Log tool count and URL on startup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Serialize the complete rmcp Tool struct (which includes inputSchema with property types, descriptions, and required fields) instead of only name and description. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
/mcp/tools.json endpoint
hogan-yuan
pushed a commit
that referenced
this pull request
Jul 6, 2026
## Summary - Add `GET /mcp/tools.json` endpoint (no auth required) that returns all registered MCP tool names and descriptions as JSON - Expose `tool_router` with `pub(crate)` visibility via `#[tool_router(vis = "pub(crate)")]` - Add `tools::list_tools()` public helper backed by `ToolRouter::list_all()` - Log tool count and URL on server startup ## Test plan - [ ] Start server and verify startup log shows `tools available count=N url=.../mcp/tools.json` - [ ] `curl http://localhost:8000/mcp/tools.json` returns JSON with `tools` array containing name/description for each tool 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
GET /mcp/tools.jsonendpoint (no auth required) that returns all registered MCP tool names and descriptions as JSONtool_routerwithpub(crate)visibility via#[tool_router(vis = "pub(crate)")]tools::list_tools()public helper backed byToolRouter::list_all()Test plan
tools available count=N url=.../mcp/tools.jsoncurl http://localhost:8000/mcp/tools.jsonreturns JSON withtoolsarray containing name/description for each tool🤖 Generated with Claude Code