Add URL elicitation support (SEP-1036)#993
Open
Kehrlann wants to merge 1 commit into
Open
Conversation
5261f3f to
43e3e00
Compare
Contributor
Author
|
@sainathreddyb I reworked your PR, would you have a look? |
Add URL-type elicitation schema support allowing servers to request URL input from users during tool execution. This enables out-of-band interactions like payment processing or API key entry. Breaking changes: - `ElicitRequest` changed from a `record` to an `interface`. - The original `ElicitRequest` record was renamed to `ElicitFormRequest`. - `McpClient` builder `elicitation()` methods now accept `ElicitFormRequest` instead of `ElicitRequest`. New APIs: - `ElicitUrlRequest` record for URL-mode elicitation. - `urlElicitation()` builder methods in `McpClient`. - `elicitationCompleteConsumer()` and `elicitationCompleteConsumers()` builder methods in `McpClient`. - `sendElicitationComplete()` methods in `McpAsyncServer` and `McpSyncServer`. - `McpError.URL_ELICITATION_REQUIRED` and `McpSchema.ErrorCodes.URL_ELICITATION_REQUIRED`. - `ElicitationCompleteNotification` record and `METHOD_NOTIFICATION_ELICITATION_COMPLETE` constant. Co-authored-by: Daniel Garnier-Moiroux <git@garnier.wf>
43e3e00 to
9cbe43b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add URL-type elicitation schema support allowing servers to request URL input from users during tool execution. This enables out-of-band interactions like payment processing or API key entry.
Breaking changes:
ElicitRequestchanged from arecordto aninterface.ElicitRequestrecord was renamed toElicitFormRequest.McpClientbuilderelicitation()methods now acceptElicitFormRequestinstead ofElicitRequest.New APIs:
ElicitUrlRequestrecord for URL-mode elicitation.urlElicitation()builder methods inMcpClient.elicitationCompleteConsumer()andelicitationCompleteConsumers()builder methods inMcpClient.sendElicitationComplete()methods inMcpAsyncServerandMcpSyncServer.McpError.URL_ELICITATION_REQUIREDandMcpSchema.ErrorCodes.URL_ELICITATION_REQUIRED.ElicitationCompleteNotificationrecord andMETHOD_NOTIFICATION_ELICITATION_COMPLETEconstant.Supersedes #939
Closes #692