Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mcp/elicitation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ func TestElicitationCompleteNotification(t *testing.T) {
}

// 2. Server sends elicitation complete notification (simulating out-of-band completion)
err = handleNotify(ctx, notificationElicitationComplete, newServerRequest(ss, &ElicitationCompleteParams{
err = ss.NotifyElicitationComplete(ctx, &ElicitationCompleteParams{
ElicitationID: elicitID,
}))
})
if err != nil {
t.Fatalf("failed to send elicitation complete notification: %v", err)
}
Expand Down
6 changes: 6 additions & 0 deletions mcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,12 @@ func (ss *ServerSession) NotifyProgress(ctx context.Context, params *ProgressNot
return handleNotify(ctx, notificationProgress, newServerRequest(ss, orZero[Params](params)))
}

// NotifyElicitationComplete signals that an out-of-band (url-mode)
// elicitation identified by params.ElicitationID has completed.
func (ss *ServerSession) NotifyElicitationComplete(ctx context.Context, params *ElicitationCompleteParams) error {
return handleNotify(ctx, notificationElicitationComplete, newServerRequest(ss, orZero[Params](params)))
}

// notifySubscriptionAcked sends a "notifications/subscriptions/acknowledged"
// notification on the listen stream represented by this session, indicating
// the subscription filter the server accepted (SEP-2575).
Expand Down
Loading