Skip to content

feat: add /mcp/tools.json endpoint - #2

Merged
huacnlee merged 2 commits into
mainfrom
tools.json
Apr 16, 2026
Merged

feat: add /mcp/tools.json endpoint#2
huacnlee merged 2 commits into
mainfrom
tools.json

Conversation

@huacnlee

Copy link
Copy Markdown
Member

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

huacnlee and others added 2 commits April 16, 2026 17:21
- 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>
@huacnlee huacnlee changed the title feat: add /mcp/tools.json endpoint feat: add /mcp/tools.json endpoint Apr 16, 2026
@huacnlee
huacnlee merged commit 3ae0bf0 into main Apr 16, 2026
@huacnlee
huacnlee deleted the tools.json branch April 16, 2026 09:24
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant