FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add URL elicitation support (SEP-1036) by Kehrlann · Pull Request #993 · modelcontextprotocol/java-sdk · GitHub

Add URL elicitation support (SEP-1036) - #993

Merged
Kehrlann merged 3 commits into
mainfrom
dgarnier/url-mode-elicitation-handler
Jun 3, 2026
Merged

Add URL elicitation support (SEP-1036)#993
Kehrlann merged 3 commits into
mainfrom
dgarnier/url-mode-elicitation-handler

Conversation

Kehrlann commented Jun 2, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

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.

Supersedes #939
Closes #692

Kehrlann force-pushed the dgarnier/url-mode-elicitation-handler branch from 5261f3f to 43e3e00 Compare June 2, 2026 13:10
Kehrlann self-assigned this Jun 2, 2026
Kehrlann requested a review from chemicL June 2, 2026 15:14
Kehrlann added P1 Significant bug affecting many users, highly requested feature enhancement New feature or request labels Jun 2, 2026

Kehrlann commented Jun 2, 2026

Copy link
Copy Markdown
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>
Kehrlann force-pushed the dgarnier/url-mode-elicitation-handler branch from 43e3e00 to 9cbe43b Compare June 2, 2026 15:42
Kehrlann requested a review from tzolov June 2, 2026 15:42

chemicL left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Overall this looks great! Just a few minor requests. Also, please add the breaking changes information into the migration md file.

Comment thread docs/server.md Outdated
chemicL added this to the 2.0.0-RC1 milestone Jun 3, 2026
Comment thread docs/server.md
Comment on lines +752 to +753
exchange.getClientCapabilities().elicitation() != null
&& exchange.getClientCapabilities().elicitation().url() != null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The UX is not great but we can add something to simplify the check in the future.

Kehrlann force-pushed the dgarnier/url-mode-elicitation-handler branch from 0662fac to d01c83a Compare June 3, 2026 12:24
Kehrlann merged commit dbb9bda into main Jun 3, 2026
24 checks passed
Kehrlann deleted the dgarnier/url-mode-elicitation-handler branch June 3, 2026 14:24
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

Labels

enhancement New feature or request P1 Significant bug affecting many users, highly requested feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEP-1036: URL Mode Elicitation for secure out-of-band interactions

2 participants


Back | FazBrowse Home | New Git URL