Commit d1bd8ad
Make IsMrtrSupported reflect low-level API availability
IsMrtrSupported now returns true whenever the low-level MRTR API
(IncompleteResultException) can be used, not just when the client
natively negotiated MRTR. The only case where it returns false is
stateless mode with a non-MRTR client, where nobody can drive the
retry loop.
- Add IsLowLevelMrtrAvailable() to McpServerImpl
- Update DestinationBoundMcpServer.IsMrtrSupported to use it
- Error explicitly for stateless + non-MRTR in the IncompleteResult
handler instead of silently serializing an unusable response
- Add Stateless_IncompleteResultException_WithoutMrtrClient_ReturnsError
test verifying the error path
- Fix existing tests: stateless tests now properly negotiate MRTR,
protocol test verifies IsMrtrSupported=true via backcompat
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 34f974b commit d1bd8ad
File tree
5 files changed
+107
-18
lines changed- src/ModelContextProtocol.Core/Server
- tests
- ModelContextProtocol.AspNetCore.Tests
- ModelContextProtocol.Tests/Client
5 files changed
+107
-18
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
1191 | 1202 | | |
1192 | 1203 | | |
1193 | 1204 | | |
| |||
1341 | 1352 | | |
1342 | 1353 | | |
1343 | 1354 | | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
1348 | 1358 | | |
1349 | 1359 | | |
1350 | 1360 | | |
1351 | 1361 | | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
1352 | 1372 | | |
1353 | 1373 | | |
1354 | 1374 | | |
| |||
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
| |||
815 | 822 | | |
816 | 823 | | |
817 | 824 | | |
818 | | - | |
| 825 | + | |
819 | 826 | | |
820 | 827 | | |
821 | 828 | | |
822 | 829 | | |
823 | | - | |
824 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
825 | 834 | | |
826 | 835 | | |
827 | 836 | | |
828 | 837 | | |
829 | | - | |
830 | | - | |
| 838 | + | |
831 | 839 | | |
832 | 840 | | |
833 | 841 | | |
| |||
Lines changed: 54 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | | - | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
356 | | - | |
| 357 | + | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
| |||
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
412 | | - | |
| 413 | + | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
| |||
643 | 644 | | |
644 | 645 | | |
645 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
646 | 696 | | |
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
263 | 274 | | |
264 | 275 | | |
265 | 276 | | |
266 | | - | |
| 277 | + | |
267 | 278 | | |
268 | 279 | | |
269 | 280 | | |
270 | 281 | | |
271 | | - | |
| 282 | + | |
272 | 283 | | |
273 | 284 | | |
274 | 285 | | |
| |||
0 commit comments