fix: include MCP tools in /v1/tools endpoint so they appear in web UI#116
Open
mricharz wants to merge 1 commit intoopen-jarvis:mainfrom
Open
fix: include MCP tools in /v1/tools endpoint so they appear in web UI#116mricharz wants to merge 1 commit intoopen-jarvis:mainfrom
mricharz wants to merge 1 commit intoopen-jarvis:mainfrom
Conversation
6af9ded to
60f60d0
Compare
The GET /v1/tools endpoint only returned tools from ToolRegistry and ChannelRegistry. MCP tools discovered via external servers were injected into streaming requests but never listed in the API response, making them invisible in the agent creation wizard. Backend: - Add _get_mcp_tools() for lazy MCP tool discovery with caching - Update list_tools() to append MCP tools with source/category "mcp" Frontend: - Add 'MCP / External' category to agent wizard tool picker - Add tool search/filter with whitespace AND-matching - Responsive dialog width (md:2xl, lg:3xl) and 3-column tool grid - Wrap tools in bordered container for visual separation - Budget field uses tooltip instead of hint text (consistent with others) - Align info icons with labels Tests: - test_tools_includes_mcp_tools: verifies MCP tools appear in response - test_tools_graceful_mcp_failure: verifies built-in tools work without MCP
60f60d0 to
e059b96
Compare
Collaborator
|
Hey @mricharz — thanks for this! The MCP tool discovery and frontend integration look solid, and all tests pass. A couple things before we can merge:
Let us know if you need any help with the rebase! |
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
[tools.mcp]) were injected into managed agent streaming requests but never listed in theGET /v1/toolsAPI response, making them invisible in the agent creation wizardlist_tools()endpoint now calls_get_mcp_tools()to lazily discover and cache MCP tools, appending them withsource: "mcp"andcategory: "mcp"Changes
Backend (
agent_manager_routes.py):_get_mcp_tools(app_state)— lazy MCP tool discovery with per-process caching onapp_statelist_tools()to acceptRequest, call_get_mcp_tools(), and append resultsFrontend (
AgentsPage.tsx,api.ts):'MCP / External'category to tool picker with auto-detection viasource === 'mcp'ha_get_state)md:max-w-2xl lg:max-w-3xl) and 3-column tool grid on large screensToolInfo.sourcetype to include'mcp'Tests (
test_tools_endpoint.py):test_tools_includes_mcp_tools: verifies MCP tools appear in/v1/toolswith correct fieldstest_tools_graceful_mcp_failure: verifies built-in tools returned when MCP is unavailableTest plan
pytest tests/server/test_tools_endpoint.py -v— all tests passconfig.toml, verify tools appear atGET /v1/toolswithsource: "mcp"