Skip to content

mcp: add ServerSession.NotifyElicitationComplete - #1194

Merged
guglielmo-san merged 2 commits into
mainfrom
guglielmoc/elicitation_complete_notification
Aug 24, 2026
Merged

mcp: add ServerSession.NotifyElicitationComplete#1194
guglielmo-san merged 2 commits into
mainfrom
guglielmoc/elicitation_complete_notification

Conversation

@guglielmo-san

@guglielmo-san guglielmo-san commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Adds:

func (ss *ServerSession) NotifyElicitationComplete(ctx context.Context, params *ElicitationCompleteParams) error

As according to spec

URL-mode elicitation is only half-usable from outside the module. A server
can reject a request with URLElicitationRequiredError, and the client then
registers a waiter and blocks the originating request until
notifications/elicitation/complete arrives, but nothing exported can send
that notification. The two in-tree tests that complete the handshake reach
for the unexported handleNotify, which an external server cannot do, so in
practice the client waits until its context is cancelled.

Add ServerSession.NotifyElicitationComplete, and switch both tests to it so
the exported path is the one under test. Nil params and an empty
ElicitationID are rejected rather than sent, since the client cannot match
either to a pending elicitation.
@guglielmo-san
guglielmo-san enabled auto-merge (squash) August 24, 2026 08:12
@guglielmo-san
guglielmo-san merged commit 6f0a645 into main Aug 24, 2026
9 checks passed
@guglielmo-san
guglielmo-san deleted the guglielmoc/elicitation_complete_notification branch August 24, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants