Proposal: Add opt-in live MCP tool discovery to mcp status (--tools) #6734
shivaperumalsamy
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
nemoclaw <sandbox> mcp status <server>verifies the managed provider, policy, credential readiness, and agent-adapter registration.However, it does not verify whether the MCP endpoint exposes the tools the agent actually needs.
I reproduced this with two endpoints for the same vendor MCP service. Both registered successfully and appeared healthy, but:
Nothing in the current
mcp statusoutput distinguished them.This is the same class of gap #6379 called out ("
mcp statusstays all-green" while the server is unusable at runtime); the--probeflag added in #6382 closed it for credential resolution, and--toolswould close it for tool availability.The current OpenClaw workaround is:
This requires adapter-specific knowledge and prints full remote schemas when only the tool inventory is needed.
Proposal
Add an opt-in live discovery flag:
It would perform the required MCP initialization and
tools/listrequest through the existing managed-MCP path and append a concise result:With
--json:{ "toolDiscovery": { "ok": true, "count": 18, "tools": [ "getJiraIssue", "searchJiraIssuesUsingJql", "createJiraIssue" ], "truncated": false } }The default
mcp statusbehavior would remain unchanged. Live network activity would occur only when--toolsis explicitly requested for a named server.Security boundary
The diagnostic would:
tools/list— both already allowlisted in the generated per-server policy (MCP_BRIDGE_ALLOWED_METHODS), so no policy change is needed;tools/callor any discovered tool;Questions
Should this be
mcp status <server> --toolsor a separatemcp tools <server>command?Should the first implementation be OpenClaw-specific, or should it begin with an adapter-neutral discovery interface? The fix(mcp): probe wire-level credential resolution in mcp status and add (#6379) #6382 probe transport (in-sandbox request wrapped in the adapter runtime, with the gateway resolving the credential placeholder) appears adapter-neutral already, so I'd propose starting there.
Should the initial JSON output contain tool names only?
I reproduced this with a working managed-MCP setup and would be happy to implement the agreed approach, including tests and documentation.
All reactions