@@ -274,6 +274,7 @@ public record RootCapabilities(@JsonProperty("listChanged") Boolean listChanged)
274274 * from MCP servers in their prompts.
275275 */
276276 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
277+ @ JsonIgnoreProperties (ignoreUnknown = true )
277278 public record Sampling () {
278279 }
279280
@@ -301,19 +302,22 @@ public record Sampling() {
301302 * @param url support for out-of-band URL-based elicitation
302303 */
303304 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
305+ @ JsonIgnoreProperties (ignoreUnknown = true )
304306 public record Elicitation (@ JsonProperty ("form" ) Form form , @ JsonProperty ("url" ) Url url ) {
305307
306308 /**
307309 * Marker record indicating support for form-based elicitation mode.
308310 */
309311 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
312+ @ JsonIgnoreProperties (ignoreUnknown = true )
310313 public record Form () {
311314 }
312315
313316 /**
314317 * Marker record indicating support for URL-based elicitation mode.
315318 */
316319 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
320+ @ JsonIgnoreProperties (ignoreUnknown = true )
317321 public record Url () {
318322 }
319323
@@ -412,13 +416,15 @@ public record ServerCapabilities( // @formatter:off
412416 * Present if the server supports argument autocompletion suggestions.
413417 */
414418 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
419+ @ JsonIgnoreProperties (ignoreUnknown = true )
415420 public record CompletionCapabilities () {
416421 }
417422
418423 /**
419424 * Present if the server supports sending log messages to the client.
420425 */
421426 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
427+ @ JsonIgnoreProperties (ignoreUnknown = true )
422428 public record LoggingCapabilities () {
423429 }
424430
@@ -429,6 +435,7 @@ public record LoggingCapabilities() {
429435 * the prompt list
430436 */
431437 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
438+ @ JsonIgnoreProperties (ignoreUnknown = true )
432439 public record PromptCapabilities (@ JsonProperty ("listChanged" ) Boolean listChanged ) {
433440 }
434441
@@ -440,6 +447,7 @@ public record PromptCapabilities(@JsonProperty("listChanged") Boolean listChange
440447 * the resource list
441448 */
442449 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
450+ @ JsonIgnoreProperties (ignoreUnknown = true )
443451 public record ResourceCapabilities (@ JsonProperty ("subscribe" ) Boolean subscribe ,
444452 @ JsonProperty ("listChanged" ) Boolean listChanged ) {
445453 }
@@ -451,6 +459,7 @@ public record ResourceCapabilities(@JsonProperty("subscribe") Boolean subscribe,
451459 * the tool list
452460 */
453461 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
462+ @ JsonIgnoreProperties (ignoreUnknown = true )
454463 public record ToolCapabilities (@ JsonProperty ("listChanged" ) Boolean listChanged ) {
455464 }
456465
@@ -882,6 +891,8 @@ public CompleteRequest(McpSchema.CompleteReference ref, CompleteArgument argumen
882891 * @param name The name of the argument
883892 * @param value The value of the argument to use for completion matching
884893 */
894+ @ JsonInclude (JsonInclude .Include .NON_ABSENT )
895+ @ JsonIgnoreProperties (ignoreUnknown = true )
885896 public record CompleteArgument (@ JsonProperty ("name" ) String name , @ JsonProperty ("value" ) String value ) {
886897 }
887898
@@ -890,6 +901,8 @@ public record CompleteArgument(@JsonProperty("name") String name, @JsonProperty(
890901 *
891902 * @param arguments Previously-resolved variables in a URI template or prompt
892903 */
904+ @ JsonInclude (JsonInclude .Include .NON_ABSENT )
905+ @ JsonIgnoreProperties (ignoreUnknown = true )
893906 public record CompleteContext (@ JsonProperty ("arguments" ) Map <String , String > arguments ) {
894907 }
895908 }
@@ -921,6 +934,7 @@ public CompleteResult(CompleteCompletion completion) {
921934 * those provided in the current response, even if the exact total is unknown
922935 */
923936 @ JsonInclude (JsonInclude .Include .ALWAYS )
937+ @ JsonIgnoreProperties (ignoreUnknown = true )
924938 public record CompleteCompletion ( // @formatter:off
925939 @ JsonProperty ("values" ) List <String > values ,
926940 @ JsonProperty ("total" ) Integer total ,
0 commit comments