fix(mcp): SSE transport served only 6 tools — delegate to the canonical dispatch#598
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.
aguung
added a commit
to aguung/wick
that referenced
this pull request
Jun 7, 2026
…olsCall Since yogasw#598 the SSE path delegates non-wick_execute tools to the canonical handleToolsCall, so the plan's top-level wick_manager_* tools must be added there only (never a second case in handleToolsCallSSE) to work on every transport. Records the buffered-vs-streaming nuance for long-running ops.
cf3bf3b to
1c8b396
Compare
yogasw
added a commit
that referenced
this pull request
Jun 7, 2026
feat(mcp): expose wickmanager ops as top-level wick_manager_* tools (stacked on #598)
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.
What
Unifies MCP tool dispatch so the Streamable HTTP/SSE transport serves the same tools as stdio. Fixes
wick_info(and 4 other tools) returningunknown toolover the shared loopback MCP.Why
tools/callhad two dispatchers:handleToolsCall(stdio + HTTP-JSON) — the complete switch: 11 tools.handleToolsCallSSE(Streamable HTTP/SSE) — its own switch handling only 6:wick_list/search/get/encrypt/decrypt/execute, withdefault → "unknown tool".Clients that speak Streamable HTTP/SSE (e.g. the agent's shared loopback
wickMCP) therefore gotunknown tool: wick_infoeven thoughtools/listadvertised it — while the stdiowick-agentserved it fine. The tools missing from the SSE path:wick_info,ask_user,wick_list_providers,wick_skill_list,wick_skill_syncThis is exactly the reported symptom:
wick_infofailed on the shared (SSE) server but worked on the stdio one.How
Collapse the SSE switch into a single delegation:
wick_list/search/get/encrypt/decrypt) usedsseStaticTool(run handler → buffer → one frame) — the delegation does the identical thing through the canonical switch, so they are unchanged.wick_executekeeps its streaming goroutine path (progress events + heartbeats).handleToolsCall). Adding a tool there works on stdio, HTTP-JSON, and HTTP-SSE automatically — no second switch to keep in sync.This also unblocks any future top-level tools (e.g. a
wick_manager_*surface) from silently breaking over SSE.Testing
TestSSEDispatchDelegatesNonStreamingTools—wick_infoover the SSE path returns its payload, notunknown tool(RED before the fix).TestSSEDispatchStillServesConnectorTools—wick_list(a previously-explicit SSE case) still returns the connector through the delegation — proves the collapsed cases aren't lost.internal/mcpsuite: 78 tests pass.go build ./cmd/lab ., gofmt clean.