feat: add ServerSession.NotifyElicitationComplete for url-mode elicitation#1096
Conversation
…ation Add an exported method to allow servers to send notifications/elicitation/complete to clients, completing the url-mode elicitation flow. Mirrors the existing NotifyProgress pattern. Fixes modelcontextprotocol#1091
|
See comment #1091 (comment) |
|
Thanks for the context, @guglielmo-san. You're right that That said, users on the current protocol (20251125) have a real blocker today — there's no exported way for a server to complete a url-mode elicitation flow, and the client side already handles this notification. The issue reporter (Arcade) is running into this in production on v1.7.0-pre.2. As a compromise, would you be open to keeping the helper but scoping it to the current protocol? A few options:
Happy to adjust the PR in whichever direction you prefer. The goal is to unblock existing url-mode elicitation users without creating maintenance burden for the new protocol. |
|
Thanks for the context, @guglielmo-san. I wasn't aware that this notification was removed entirely in protocolVersion 20260728. Given that, adding a public API for it doesn't make sense — I'll close this PR. Appreciate you looking into it. |
Summary
Add an exported
ServerSession.NotifyElicitationCompletemethod so MCP servers can notify clients when an out-of-band URL-mode elicitation has completed.Fixes #1091.
Background
The client side of the URL-mode elicitation flow already handles
notifications/elicitation/completethroughClientOptions.ElicitationCompleteHandlerand the URL elicitation middleware. However, servers had no exported API for sending that notification. The only available path required using unexported SDK internals, which prevented external server implementations from completing the flow.Changes
ServerSession.NotifyElicitationCompletewith the same notification helper pattern used byServerSession.NotifyProgress.ElicitationCompleteParamsusing the existingnotificationElicitationCompletemethod constant and sharedhandleNotifydispatch path.Test Plan
go build ./...go test ./...go vet ./...