Commit 9a63538
feat: add AudioContent support to MCP schema (#243)
- Add AudioContent record class implementing Annotated and Content interfaces
- Update Content sealed interface to permit AudioContent
- Add audio type handling in Content.type() method
- Include AudioContent in JsonSubTypes annotation for polymorphic deserialization
- Add comprehensive tests for AudioContent serialization and deserialization
- Update error message test to include audio in known type ids
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/c87a0da6d8c2436d56a6398023c80b0562224454/schema/2025-03-26/schema.ts#L987-L10091 parent b539b98 commit 9a63538
File tree
2 files changed
+36
-2
lines changed- mcp/src
- main/java/io/modelcontextprotocol/spec
- test/java/io/modelcontextprotocol/spec
2 files changed
+36
-2
lines changedLines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1359 | 1359 | | |
1360 | 1360 | | |
1361 | 1361 | | |
| 1362 | + | |
1362 | 1363 | | |
1363 | | - | |
| 1364 | + | |
1364 | 1365 | | |
1365 | 1366 | | |
1366 | 1367 | | |
| |||
1369 | 1370 | | |
1370 | 1371 | | |
1371 | 1372 | | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1372 | 1376 | | |
1373 | 1377 | | |
1374 | 1378 | | |
| |||
1398 | 1402 | | |
1399 | 1403 | | |
1400 | 1404 | | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1401 | 1413 | | |
1402 | 1414 | | |
1403 | 1415 | | |
| |||
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
87 | 109 | | |
88 | 110 | | |
89 | 111 | | |
| |||
0 commit comments