Commit f113f07
committed
test(e2e): prove MCP tool-catalog sync end-to-end
Four cross-target scenarios (cloud + selfhost) driving only public surfaces
(typed API + sandbox executions) against real MCP servers whose catalogs
mutate mid-scenario:
- list_changed: a tool call renames the server's catalog mid-call; the
notification rides the open connection and the very next tools read
re-lists — no refresh click, no failing retry.
- unknown-tool self-heal: the catalog mutates outside any call window (no
notification available); invoking the retired tool fails with the typed
mcp_tool_unknown error telling the agent to re-list, and that failure
alone heals the catalog for the next read.
- pagination: a server paging tools/list via nextCursor registers its whole
catalog, not just the first page.
- outage resilience: a refresh against a dead server keeps the working
catalog instead of wiping it, and converges to the server's new catalog
once it recovers.
The mutable-catalog test fixture now also sends list_changed through the
tool handler's request-scoped notifier: the SDK's RegisteredTool.update
emits it with no relatedRequestId, which the streamable-http transport
routes to the standalone GET SSE stream — a stream a request-scoped client
may never hold open. Stamping the request id routes it onto the in-flight
call's response stream, matching how a real server notifies mid-call.1 parent d6c92c9 commit f113f07
2 files changed
Lines changed: 534 additions & 1 deletion
0 commit comments