feat(mcp): expose wickmanager ops as top-level wick_manager_* tools (stacked on #598)#600
Merged
Merged
Conversation
…l switch The Streamable HTTP/SSE path (handleToolsCallSSE) had its own tool switch that only handled wick_list/search/get/encrypt/decrypt/execute and returned "unknown tool" for everything else. So over the shared loopback MCP (which clients reach via SSE), wick_info, ask_user, wick_list_providers, and the wick_skill_* tools were advertised in tools/list but failed on tools/call — while the stdio transport (one complete switch in handleToolsCall) served them fine. That mismatch is why wick_info returned "unknown tool" on the shared server but worked on the stdio wick-agent. Collapse the SSE switch: wick_execute keeps its streaming path; every other tool is buffered through the canonical handleToolsCall dispatcher and framed as one SSE event. The tool switch now lives in exactly one place, so adding a tool there works on both transports automatically — no second switch to keep in sync.
The wickmanager connector was reachable only via the meta-tool pattern (wick_list/get/execute). Expand its ops into top-level tools named wick_manager_<op> so the LLM discovers them directly in tools/list without a wick_get round-trip — the design recorded in plan_wickmanager.md. - handleToolsList appends WickManagerToolDescriptors (gated by the row's IsVisibleTo, schemas from ConfigsToJSONSchema) to the meta-tool list. - handleToolsCall routes wick_manager_<op> to WickManagerExecute, which translates to the canonical wick_execute (tool_id conn:<id>/<op>) so the connector's visibility + per-op access gates apply unchanged. - To avoid double-exposure, wickmanager is excluded from the wick_list and wick_search discovery surfaces — it is the top-level exception; its ops appear once, as wick_manager_*, not also as a conn:wickmanager connector. All on the canonical handlers, so the tools work over stdio, HTTP-JSON, AND SSE (the SSE path delegates to handleToolsCall) — verified by tests on both transports, the catalog, and the no-duplication guard.
Add changelog entry, expand guide/mcp.md with a dedicated section for the new wick_manager_<op> surface, update stale tool-count references, and note the top-level MCP surface in connectors/wickmanager.md.
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.
This branch is built on top of #598 (the SSE tool-dispatch fix), which is still open. Two of the commits here belong to #598:
fix(mcp): SSE transport dispatched only 6 tools — delegate to the canonical dispatchdocs: changelog entry for MCP SSE tool-dispatch fixPlease merge #598 first; this PR's diff then reduces to just the
feat(mcp): expose wickmanager ops as top-level wick_manager_* toolscommit (+ its docs). The feature needs #598 because the SSE transport only serves these new tools once the SSE path delegates to the canonical dispatch.What
Surfaces the wickmanager connector's ops as top-level MCP tools named
wick_manager_<op>(e.g.wick_manager_app_list,wick_manager_job_run_now) directly intools/list, instead of only via the meta-tool pattern (wick_list/wick_get/wick_execute). This is the design recorded ininternal/docs/plan_wickmanager.md— the LLM discovers them without awick_getround-trip.How
handleToolsListappendsWickManagerToolDescriptors(...)to the meta-tool list — ops expanded with schemas fromConfigsToJSONSchema, gated by the connector row'sIsVisibleTo(callers who can't see the row get none).handleToolsCallrouteswick_manager_<op>toWickManagerExecute, which translates to the canonicalwick_execute(tool_id = conn:<wickmanager_id>/<op>) — so the connector's visibility check and per-op access gates apply unchanged (no security bypass).wick_list/wick_searchdiscovery surfaces. Its ops appear once — aswick_manager_*— not also as aconn:wickmanagerconnector. Other connectors are untouched.handleToolsCallper fix(mcp): SSE transport served only 6 tools — delegate to the canonical dispatch #598).Testing
TestWickManagerExpandedInCatalog—wick_manager_app_listappears intools/list.TestWickManagerNotDuplicatedInMetaTools— wickmanager no longer shows up inwick_list(no duplication).TestWickManagerDispatchStdio/TestWickManagerDispatchSSE— the tool dispatches and succeeds (isError:false) over both transports.internal/mcpsuite: 82 tests pass.go build ./cmd/lab ., gofmt clean.Notes / follow-ups
IsVisibleTo); finer per-op catalog filtering (the full access table in the plan) is deferred — execution is already protected by the per-op gates.job_run_now,system_server_*) currently return a single buffered SSE frame (no incremental progress/heartbeat); if any needs streaming, route it through thewick_executestreaming path — ideally via astreaming: truedescriptor flag rather than a hardcoded name.