feat(mcp): verify and guarantee list_changed on madt_enable dynamic domain loading #7
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #10.
Claude Code honors
notifications/tools/list_changed(and the prompts/resources variants): "Claude Code automatically refreshes the available capabilities from that server" (docs, verified 2026-07-06). madtea'smadt_enableloads gated domains (admin, users, hooks, …) mid-session — exactly the dynamic-registration case — but whether the go-sdk emits list_changed when tools are added post-initialize has never been verified for our wiring.Acceptance criteria
modelcontextprotocol/go-sdkv1.6+ auto-emits tools/list_changed on AddTool after connect; if not, emit it explicitly after madt_enable registers a domainlistChanged: truetools capabilityLanded in a later PR (2026-07-09). The verify-and-guarantee outcome: the wiring was already correct — go-sdk v1.6.1 auto-emits
tools/list_changedfromAddToolon a connected server (server.go:282, 10ms debounce) and auto-infers thelistChanged: truecapability; madt_enable's dynamic registration flows through the sameaddToolchokepoint as static registration (which also means the outputSchema stamping covers dynamically-loaded tools — test-proven with the hooks domain). Three integration tests now pin all of it; result text and help already said "available immediately" and are now evidence-backed.The one criterion left (why this stays open): the live Claude Code check — in a real session,
madt_enable domains=["hooks"](or any gated domain) and confirm the domain's tools are callable the SAME session without a/mcpreconnect. One interactive session on a post-v0.14.24 binary closes this.Live check completed 2026-07-15 in a real Claude Code session on the v0.15.1 binary — the one criterion that was holding this open. Sequence:
madt_enable domains=["hooks"]returned "Enabled 1 domain(s): hooks — new tools are now available"; the client surfacedmadt_hooksin the same session with no /mcp reconnect;madt_hooks action=listexecuted successfully against the live repo ("No webhooks found" — correct, none configured). tools/list_changed → automatic client capability refresh → same-session callability, end to end. All other criteria were already machine-verified per the 2026-07-12 comment (go-sdk v1.6.1 auto-emits from AddTool, listChanged capability auto-inferred, three integration tests pin it).