|
325 | 325 | "null" |
326 | 326 | ] |
327 | 327 | }, |
| 328 | + "title": { |
| 329 | + "description": "Optional title for the schema", |
| 330 | + "type": [ |
| 331 | + "string", |
| 332 | + "null" |
| 333 | + ] |
| 334 | + }, |
328 | 335 | "type": { |
329 | 336 | "description": "Type discriminator", |
330 | 337 | "allOf": [ |
|
631 | 638 | "type": "string" |
632 | 639 | } |
633 | 640 | }, |
| 641 | + "title": { |
| 642 | + "description": "Optional title for the schema", |
| 643 | + "type": [ |
| 644 | + "string", |
| 645 | + "null" |
| 646 | + ] |
| 647 | + }, |
634 | 648 | "type": { |
635 | 649 | "description": "Always \"object\" for elicitation schemas", |
636 | 650 | "allOf": [ |
|
649 | 663 | "description": "This is commonly used for representing empty objects in MCP messages.\n\nwithout returning any specific data.", |
650 | 664 | "type": "object" |
651 | 665 | }, |
| 666 | + "EnumSchema": { |
| 667 | + "description": "Schema definition for enum properties.\n\nCompliant with MCP 2025-06-18 specification for elicitation schemas.\nEnums must have string type and can optionally include human-readable names.", |
| 668 | + "type": "object", |
| 669 | + "properties": { |
| 670 | + "description": { |
| 671 | + "description": "Human-readable description", |
| 672 | + "type": [ |
| 673 | + "string", |
| 674 | + "null" |
| 675 | + ] |
| 676 | + }, |
| 677 | + "enum": { |
| 678 | + "description": "Allowed enum values (string values only per MCP spec)", |
| 679 | + "type": "array", |
| 680 | + "items": { |
| 681 | + "type": "string" |
| 682 | + } |
| 683 | + }, |
| 684 | + "enumNames": { |
| 685 | + "description": "Optional human-readable names for each enum value", |
| 686 | + "type": [ |
| 687 | + "array", |
| 688 | + "null" |
| 689 | + ], |
| 690 | + "items": { |
| 691 | + "type": "string" |
| 692 | + } |
| 693 | + }, |
| 694 | + "title": { |
| 695 | + "description": "Optional title for the schema", |
| 696 | + "type": [ |
| 697 | + "string", |
| 698 | + "null" |
| 699 | + ] |
| 700 | + }, |
| 701 | + "type": { |
| 702 | + "description": "Type discriminator (always \"string\" for enums)", |
| 703 | + "allOf": [ |
| 704 | + { |
| 705 | + "$ref": "#/definitions/StringTypeConst" |
| 706 | + } |
| 707 | + ] |
| 708 | + } |
| 709 | + }, |
| 710 | + "required": [ |
| 711 | + "type", |
| 712 | + "enum" |
| 713 | + ] |
| 714 | + }, |
652 | 715 | "ErrorCode": { |
653 | 716 | "description": "Standard JSON-RPC error codes used throughout the MCP protocol.\n\nThese codes follow the JSON-RPC 2.0 specification and provide\nstandardized error reporting across all MCP implementations.", |
654 | 717 | "type": "integer", |
|
808 | 871 | ] |
809 | 872 | }, |
810 | 873 | "IntegerSchema": { |
811 | | - "description": "Schema definition for integer properties.\n\nSupports range validation, multiples, and enum values.", |
| 874 | + "description": "Schema definition for integer properties.\n\nCompliant with MCP 2025-06-18 specification for elicitation schemas.\nSupports only the fields allowed by the MCP spec.", |
812 | 875 | "type": "object", |
813 | 876 | "properties": { |
814 | | - "default": { |
815 | | - "description": "Default value", |
816 | | - "type": [ |
817 | | - "integer", |
818 | | - "null" |
819 | | - ], |
820 | | - "format": "int64" |
821 | | - }, |
822 | 877 | "description": { |
823 | 878 | "description": "Human-readable description", |
824 | 879 | "type": [ |
825 | 880 | "string", |
826 | 881 | "null" |
827 | 882 | ] |
828 | 883 | }, |
829 | | - "enum": { |
830 | | - "description": "Allowed integer values (when used as enum)", |
831 | | - "type": [ |
832 | | - "array", |
833 | | - "null" |
834 | | - ], |
835 | | - "items": { |
836 | | - "type": "integer", |
837 | | - "format": "int64" |
838 | | - } |
839 | | - }, |
840 | | - "enumNames": { |
841 | | - "description": "Optional human-readable names for each enum value", |
842 | | - "type": [ |
843 | | - "array", |
844 | | - "null" |
845 | | - ], |
846 | | - "items": { |
847 | | - "type": "string" |
848 | | - } |
849 | | - }, |
850 | | - "exclusiveMaximum": { |
851 | | - "description": "Maximum value (exclusive)", |
852 | | - "type": [ |
853 | | - "integer", |
854 | | - "null" |
855 | | - ], |
856 | | - "format": "int64" |
857 | | - }, |
858 | | - "exclusiveMinimum": { |
859 | | - "description": "Minimum value (exclusive)", |
860 | | - "type": [ |
861 | | - "integer", |
862 | | - "null" |
863 | | - ], |
864 | | - "format": "int64" |
865 | | - }, |
866 | 884 | "maximum": { |
867 | 885 | "description": "Maximum value (inclusive)", |
868 | 886 | "type": [ |
|
879 | 897 | ], |
880 | 898 | "format": "int64" |
881 | 899 | }, |
882 | | - "multipleOf": { |
883 | | - "description": "Value must be a multiple of this number", |
| 900 | + "title": { |
| 901 | + "description": "Optional title for the schema", |
884 | 902 | "type": [ |
885 | | - "integer", |
| 903 | + "string", |
886 | 904 | "null" |
887 | | - ], |
888 | | - "format": "int64" |
| 905 | + ] |
889 | 906 | }, |
890 | 907 | "type": { |
891 | 908 | "description": "Type discriminator", |
|
1300 | 1317 | ] |
1301 | 1318 | }, |
1302 | 1319 | "NumberSchema": { |
1303 | | - "description": "Schema definition for number properties (floating-point).\n\nSupports range validation, multiples, and enum values.", |
| 1320 | + "description": "Schema definition for number properties (floating-point).\n\nCompliant with MCP 2025-06-18 specification for elicitation schemas.\nSupports only the fields allowed by the MCP spec.", |
1304 | 1321 | "type": "object", |
1305 | 1322 | "properties": { |
1306 | | - "default": { |
1307 | | - "description": "Default value", |
1308 | | - "type": [ |
1309 | | - "number", |
1310 | | - "null" |
1311 | | - ], |
1312 | | - "format": "double" |
1313 | | - }, |
1314 | 1323 | "description": { |
1315 | 1324 | "description": "Human-readable description", |
1316 | 1325 | "type": [ |
1317 | 1326 | "string", |
1318 | 1327 | "null" |
1319 | 1328 | ] |
1320 | 1329 | }, |
1321 | | - "enum": { |
1322 | | - "description": "Allowed number values (when used as enum)", |
1323 | | - "type": [ |
1324 | | - "array", |
1325 | | - "null" |
1326 | | - ], |
1327 | | - "items": { |
1328 | | - "type": "number", |
1329 | | - "format": "double" |
1330 | | - } |
1331 | | - }, |
1332 | | - "enumNames": { |
1333 | | - "description": "Optional human-readable names for each enum value", |
1334 | | - "type": [ |
1335 | | - "array", |
1336 | | - "null" |
1337 | | - ], |
1338 | | - "items": { |
1339 | | - "type": "string" |
1340 | | - } |
1341 | | - }, |
1342 | | - "exclusiveMaximum": { |
1343 | | - "description": "Maximum value (exclusive)", |
1344 | | - "type": [ |
1345 | | - "number", |
1346 | | - "null" |
1347 | | - ], |
1348 | | - "format": "double" |
1349 | | - }, |
1350 | | - "exclusiveMinimum": { |
1351 | | - "description": "Minimum value (exclusive)", |
1352 | | - "type": [ |
1353 | | - "number", |
1354 | | - "null" |
1355 | | - ], |
1356 | | - "format": "double" |
1357 | | - }, |
1358 | 1330 | "maximum": { |
1359 | 1331 | "description": "Maximum value (inclusive)", |
1360 | 1332 | "type": [ |
|
1371 | 1343 | ], |
1372 | 1344 | "format": "double" |
1373 | 1345 | }, |
1374 | | - "multipleOf": { |
1375 | | - "description": "Value must be a multiple of this number", |
| 1346 | + "title": { |
| 1347 | + "description": "Optional title for the schema", |
1376 | 1348 | "type": [ |
1377 | | - "number", |
| 1349 | + "string", |
1378 | 1350 | "null" |
1379 | | - ], |
1380 | | - "format": "double" |
| 1351 | + ] |
1381 | 1352 | }, |
1382 | 1353 | "type": { |
1383 | 1354 | "description": "Type discriminator", |
|
1408 | 1379 | "const": "ping" |
1409 | 1380 | }, |
1410 | 1381 | "PrimitiveSchema": { |
1411 | | - "description": "Primitive schema definition for elicitation properties.\n\nAccording to MCP 2025-06-18 specification, elicitation schemas must have\nproperties of primitive types only (string, number, integer, boolean).", |
| 1382 | + "description": "Primitive schema definition for elicitation properties.\n\nAccording to MCP 2025-06-18 specification, elicitation schemas must have\nproperties of primitive types only (string, number, integer, boolean, enum).", |
1412 | 1383 | "anyOf": [ |
1413 | 1384 | { |
1414 | 1385 | "description": "String property (with optional enum constraint)", |
|
1441 | 1412 | "$ref": "#/definitions/BooleanSchema" |
1442 | 1413 | } |
1443 | 1414 | ] |
| 1415 | + }, |
| 1416 | + { |
| 1417 | + "description": "Enum property (explicit enum schema)", |
| 1418 | + "allOf": [ |
| 1419 | + { |
| 1420 | + "$ref": "#/definitions/EnumSchema" |
| 1421 | + } |
| 1422 | + ] |
1444 | 1423 | } |
1445 | 1424 | ] |
1446 | 1425 | }, |
|
2220 | 2199 | ] |
2221 | 2200 | }, |
2222 | 2201 | "StringSchema": { |
2223 | | - "description": "Schema definition for string properties.\n\nSupports validation constraints like length, pattern matching, format, and enum values.\nAll fields are private to ensure validation - use builder methods to construct.", |
| 2202 | + "description": "Schema definition for string properties.\n\nCompliant with MCP 2025-06-18 specification for elicitation schemas.\nSupports only the fields allowed by the MCP spec:\n- format limited to: \"email\", \"uri\", \"date\", \"date-time\"", |
2224 | 2203 | "type": "object", |
2225 | 2204 | "properties": { |
2226 | | - "default": { |
2227 | | - "description": "Default value", |
2228 | | - "type": [ |
2229 | | - "string", |
2230 | | - "null" |
2231 | | - ] |
2232 | | - }, |
2233 | 2205 | "description": { |
2234 | 2206 | "description": "Human-readable description", |
2235 | 2207 | "type": [ |
2236 | 2208 | "string", |
2237 | 2209 | "null" |
2238 | 2210 | ] |
2239 | 2211 | }, |
2240 | | - "enum": { |
2241 | | - "description": "Allowed string values (when used as enum)", |
2242 | | - "type": [ |
2243 | | - "array", |
2244 | | - "null" |
2245 | | - ], |
2246 | | - "items": { |
2247 | | - "type": "string" |
2248 | | - } |
2249 | | - }, |
2250 | | - "enumNames": { |
2251 | | - "description": "Optional human-readable names for each enum value", |
2252 | | - "type": [ |
2253 | | - "array", |
2254 | | - "null" |
2255 | | - ], |
2256 | | - "items": { |
2257 | | - "type": "string" |
2258 | | - } |
2259 | | - }, |
2260 | 2212 | "format": { |
2261 | | - "description": "String format (e.g., \"email\", \"uri\", \"date-time\")", |
| 2213 | + "description": "String format - limited to: \"email\", \"uri\", \"date\", \"date-time\"", |
2262 | 2214 | "type": [ |
2263 | 2215 | "string", |
2264 | 2216 | "null" |
|
2282 | 2234 | "format": "uint32", |
2283 | 2235 | "minimum": 0 |
2284 | 2236 | }, |
2285 | | - "pattern": { |
2286 | | - "description": "Regular expression pattern", |
| 2237 | + "title": { |
| 2238 | + "description": "Optional title for the schema", |
2287 | 2239 | "type": [ |
2288 | 2240 | "string", |
2289 | 2241 | "null" |
|
0 commit comments