|
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", |
|
805 | 868 | ] |
806 | 869 | }, |
807 | 870 | "IntegerSchema": { |
808 | | - "description": "Schema definition for integer properties.\n\nSupports range validation, multiples, and enum values.", |
| 871 | + "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.", |
809 | 872 | "type": "object", |
810 | 873 | "properties": { |
811 | | - "default": { |
812 | | - "description": "Default value", |
813 | | - "type": [ |
814 | | - "integer", |
815 | | - "null" |
816 | | - ], |
817 | | - "format": "int64" |
818 | | - }, |
819 | 874 | "description": { |
820 | 875 | "description": "Human-readable description", |
821 | 876 | "type": [ |
822 | 877 | "string", |
823 | 878 | "null" |
824 | 879 | ] |
825 | 880 | }, |
826 | | - "enum": { |
827 | | - "description": "Allowed integer values (when used as enum)", |
828 | | - "type": [ |
829 | | - "array", |
830 | | - "null" |
831 | | - ], |
832 | | - "items": { |
833 | | - "type": "integer", |
834 | | - "format": "int64" |
835 | | - } |
836 | | - }, |
837 | | - "enumNames": { |
838 | | - "description": "Optional human-readable names for each enum value", |
839 | | - "type": [ |
840 | | - "array", |
841 | | - "null" |
842 | | - ], |
843 | | - "items": { |
844 | | - "type": "string" |
845 | | - } |
846 | | - }, |
847 | | - "exclusiveMaximum": { |
848 | | - "description": "Maximum value (exclusive)", |
849 | | - "type": [ |
850 | | - "integer", |
851 | | - "null" |
852 | | - ], |
853 | | - "format": "int64" |
854 | | - }, |
855 | | - "exclusiveMinimum": { |
856 | | - "description": "Minimum value (exclusive)", |
857 | | - "type": [ |
858 | | - "integer", |
859 | | - "null" |
860 | | - ], |
861 | | - "format": "int64" |
862 | | - }, |
863 | 881 | "maximum": { |
864 | 882 | "description": "Maximum value (inclusive)", |
865 | 883 | "type": [ |
|
876 | 894 | ], |
877 | 895 | "format": "int64" |
878 | 896 | }, |
879 | | - "multipleOf": { |
880 | | - "description": "Value must be a multiple of this number", |
| 897 | + "title": { |
| 898 | + "description": "Optional title for the schema", |
881 | 899 | "type": [ |
882 | | - "integer", |
| 900 | + "string", |
883 | 901 | "null" |
884 | | - ], |
885 | | - "format": "int64" |
| 902 | + ] |
886 | 903 | }, |
887 | 904 | "type": { |
888 | 905 | "description": "Type discriminator", |
|
1297 | 1314 | ] |
1298 | 1315 | }, |
1299 | 1316 | "NumberSchema": { |
1300 | | - "description": "Schema definition for number properties (floating-point).\n\nSupports range validation, multiples, and enum values.", |
| 1317 | + "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.", |
1301 | 1318 | "type": "object", |
1302 | 1319 | "properties": { |
1303 | | - "default": { |
1304 | | - "description": "Default value", |
1305 | | - "type": [ |
1306 | | - "number", |
1307 | | - "null" |
1308 | | - ], |
1309 | | - "format": "double" |
1310 | | - }, |
1311 | 1320 | "description": { |
1312 | 1321 | "description": "Human-readable description", |
1313 | 1322 | "type": [ |
1314 | 1323 | "string", |
1315 | 1324 | "null" |
1316 | 1325 | ] |
1317 | 1326 | }, |
1318 | | - "enum": { |
1319 | | - "description": "Allowed number values (when used as enum)", |
1320 | | - "type": [ |
1321 | | - "array", |
1322 | | - "null" |
1323 | | - ], |
1324 | | - "items": { |
1325 | | - "type": "number", |
1326 | | - "format": "double" |
1327 | | - } |
1328 | | - }, |
1329 | | - "enumNames": { |
1330 | | - "description": "Optional human-readable names for each enum value", |
1331 | | - "type": [ |
1332 | | - "array", |
1333 | | - "null" |
1334 | | - ], |
1335 | | - "items": { |
1336 | | - "type": "string" |
1337 | | - } |
1338 | | - }, |
1339 | | - "exclusiveMaximum": { |
1340 | | - "description": "Maximum value (exclusive)", |
1341 | | - "type": [ |
1342 | | - "number", |
1343 | | - "null" |
1344 | | - ], |
1345 | | - "format": "double" |
1346 | | - }, |
1347 | | - "exclusiveMinimum": { |
1348 | | - "description": "Minimum value (exclusive)", |
1349 | | - "type": [ |
1350 | | - "number", |
1351 | | - "null" |
1352 | | - ], |
1353 | | - "format": "double" |
1354 | | - }, |
1355 | 1327 | "maximum": { |
1356 | 1328 | "description": "Maximum value (inclusive)", |
1357 | 1329 | "type": [ |
|
1368 | 1340 | ], |
1369 | 1341 | "format": "double" |
1370 | 1342 | }, |
1371 | | - "multipleOf": { |
1372 | | - "description": "Value must be a multiple of this number", |
| 1343 | + "title": { |
| 1344 | + "description": "Optional title for the schema", |
1373 | 1345 | "type": [ |
1374 | | - "number", |
| 1346 | + "string", |
1375 | 1347 | "null" |
1376 | | - ], |
1377 | | - "format": "double" |
| 1348 | + ] |
1378 | 1349 | }, |
1379 | 1350 | "type": { |
1380 | 1351 | "description": "Type discriminator", |
|
1405 | 1376 | "const": "ping" |
1406 | 1377 | }, |
1407 | 1378 | "PrimitiveSchema": { |
1408 | | - "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).", |
| 1379 | + "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).", |
1409 | 1380 | "anyOf": [ |
1410 | 1381 | { |
1411 | 1382 | "description": "String property (with optional enum constraint)", |
|
1438 | 1409 | "$ref": "#/definitions/BooleanSchema" |
1439 | 1410 | } |
1440 | 1411 | ] |
| 1412 | + }, |
| 1413 | + { |
| 1414 | + "description": "Enum property (explicit enum schema)", |
| 1415 | + "allOf": [ |
| 1416 | + { |
| 1417 | + "$ref": "#/definitions/EnumSchema" |
| 1418 | + } |
| 1419 | + ] |
1441 | 1420 | } |
1442 | 1421 | ] |
1443 | 1422 | }, |
|
2217 | 2196 | ] |
2218 | 2197 | }, |
2219 | 2198 | "StringSchema": { |
2220 | | - "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.", |
| 2199 | + "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\"", |
2221 | 2200 | "type": "object", |
2222 | 2201 | "properties": { |
2223 | | - "default": { |
2224 | | - "description": "Default value", |
2225 | | - "type": [ |
2226 | | - "string", |
2227 | | - "null" |
2228 | | - ] |
2229 | | - }, |
2230 | 2202 | "description": { |
2231 | 2203 | "description": "Human-readable description", |
2232 | 2204 | "type": [ |
2233 | 2205 | "string", |
2234 | 2206 | "null" |
2235 | 2207 | ] |
2236 | 2208 | }, |
2237 | | - "enum": { |
2238 | | - "description": "Allowed string values (when used as enum)", |
2239 | | - "type": [ |
2240 | | - "array", |
2241 | | - "null" |
2242 | | - ], |
2243 | | - "items": { |
2244 | | - "type": "string" |
2245 | | - } |
2246 | | - }, |
2247 | | - "enumNames": { |
2248 | | - "description": "Optional human-readable names for each enum value", |
2249 | | - "type": [ |
2250 | | - "array", |
2251 | | - "null" |
2252 | | - ], |
2253 | | - "items": { |
2254 | | - "type": "string" |
2255 | | - } |
2256 | | - }, |
2257 | 2209 | "format": { |
2258 | | - "description": "String format (e.g., \"email\", \"uri\", \"date-time\")", |
| 2210 | + "description": "String format - limited to: \"email\", \"uri\", \"date\", \"date-time\"", |
2259 | 2211 | "type": [ |
2260 | 2212 | "string", |
2261 | 2213 | "null" |
|
2279 | 2231 | "format": "uint32", |
2280 | 2232 | "minimum": 0 |
2281 | 2233 | }, |
2282 | | - "pattern": { |
2283 | | - "description": "Regular expression pattern", |
| 2234 | + "title": { |
| 2235 | + "description": "Optional title for the schema", |
2284 | 2236 | "type": [ |
2285 | 2237 | "string", |
2286 | 2238 | "null" |
|
0 commit comments