Commit 9cbe43b
Add URL elicitation support (SEP-1036)
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>1 parent c49a994 commit 9cbe43b
18 files changed
Lines changed: 1412 additions & 179 deletions
File tree
- docs
- mcp-core/src
- main/java/io/modelcontextprotocol
- client
- server
- spec
- test/java/io/modelcontextprotocol
- client
- server
- mcp-test/src
- main/java/io/modelcontextprotocol
- client
- test/java/io/modelcontextprotocol
- client
- spec
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
| 273 | + | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
284 | | - | |
| 291 | + | |
285 | 292 | | |
286 | | - | |
| 293 | + | |
| 294 | + | |
287 | 295 | | |
288 | 296 | | |
289 | 297 | | |
| |||
293 | 301 | | |
294 | 302 | | |
295 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
296 | 326 | | |
297 | 327 | | |
298 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
719 | | - | |
720 | | - | |
| 718 | + | |
721 | 719 | | |
722 | 720 | | |
723 | 721 | | |
| |||
739 | 737 | | |
740 | 738 | | |
741 | 739 | | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
742 | 768 | | |
743 | 769 | | |
744 | 770 | | |
| |||
Lines changed: 70 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
| |||
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
| |||
226 | 238 | | |
227 | 239 | | |
228 | 240 | | |
229 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
230 | 244 | | |
231 | | - | |
| 245 | + | |
232 | 246 | | |
233 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
234 | 253 | | |
235 | 254 | | |
236 | 255 | | |
| |||
301 | 320 | | |
302 | 321 | | |
303 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
304 | 333 | | |
305 | 334 | | |
306 | 335 | | |
| |||
552 | 581 | | |
553 | 582 | | |
554 | 583 | | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | 584 | | |
559 | 585 | | |
560 | | - | |
| 586 | + | |
561 | 587 | | |
562 | 588 | | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
569 | 593 | | |
570 | | - | |
571 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
572 | 626 | | |
573 | 627 | | |
574 | 628 | | |
| |||
0 commit comments