diff --git a/mcp-bom/pom.xml b/mcp-bom/pom.xml index 3c83afda3..02ff025d2 100644 --- a/mcp-bom/pom.xml +++ b/mcp-bom/pom.xml @@ -7,7 +7,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 mcp-bom diff --git a/mcp-core/pom.xml b/mcp-core/pom.xml index 5681385b6..dc244a603 100644 --- a/mcp-core/pom.xml +++ b/mcp-core/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 mcp-core jar @@ -68,7 +68,7 @@ io.modelcontextprotocol.sdk mcp-json - 0.15.0-SNAPSHOT + 0.16.0 @@ -101,7 +101,7 @@ io.modelcontextprotocol.sdk mcp-json-jackson2 - 0.15.0-SNAPSHOT + 0.16.0 test diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java index 047462ae4..87c84ba1b 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/server/McpServer.java @@ -598,7 +598,6 @@ public AsyncSpecification resources(McpServerFeatures.AsyncResourceSpecificat * null. * @return This builder instance for method chaining * @throws IllegalArgumentException if resourceTemplates is null. - * @see #resourceTemplates(ResourceTemplate...) */ public AsyncSpecification resourceTemplates( List resourceTemplates) { @@ -1195,7 +1194,6 @@ public SyncSpecification resources(McpServerFeatures.SyncResourceSpecificatio * null. * @return This builder instance for method chaining * @throws IllegalArgumentException if resourceTemplates is null. - * @see #resourceTemplates(ResourceTemplate...) */ public SyncSpecification resourceTemplates( List resourceTemplates) { @@ -1703,7 +1701,6 @@ public StatelessAsyncSpecification resources( * templates. * @return This builder instance for method chaining * @throws IllegalArgumentException if resourceTemplates is null. - * @see #resourceTemplates(ResourceTemplate...) */ public StatelessAsyncSpecification resourceTemplates( List resourceTemplates) { @@ -2166,7 +2163,6 @@ public StatelessSyncSpecification resources( * existing templates. * @return This builder instance for method chaining * @throws IllegalArgumentException if resourceTemplates is null. - * @see #resourceTemplates(ResourceTemplate...) */ public StatelessSyncSpecification resourceTemplates( List resourceTemplatesSpec) { diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpClientSession.java b/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpClientSession.java index bc3f53467..0ba7ab3b8 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpClientSession.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpClientSession.java @@ -166,9 +166,15 @@ private void handle(McpSchema.JSONRPCMessage message) { else if (message instanceof McpSchema.JSONRPCRequest request) { logger.debug("Received request: {}", request); handleIncomingRequest(request).onErrorResume(error -> { + + McpSchema.JSONRPCResponse.JSONRPCError jsonRpcError = (error instanceof McpError mcpError + && mcpError.getJsonRpcError() != null) ? mcpError.getJsonRpcError() + // TODO: add error message through the data field + : new McpSchema.JSONRPCResponse.JSONRPCError(McpSchema.ErrorCodes.INTERNAL_ERROR, + error.getMessage(), McpError.aggregateExceptionMessages(error)); + var errorResponse = new McpSchema.JSONRPCResponse(McpSchema.JSONRPC_VERSION, request.id(), null, - new McpSchema.JSONRPCResponse.JSONRPCError(McpSchema.ErrorCodes.INTERNAL_ERROR, - error.getMessage(), null)); + jsonRpcError); return Mono.just(errorResponse); }).flatMap(this.transport::sendMessage).onErrorComplete(t -> { logger.warn("Issue sending response to the client, ", t); diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java b/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java index e43469903..342fc5347 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java @@ -167,9 +167,9 @@ public sealed interface Request extends Meta permits InitializeRequest, CallToolRequest, CreateMessageRequest, ElicitRequest, CompleteRequest, GetPromptRequest, ReadResourceRequest, SubscribeRequest, UnsubscribeRequest, PaginatedRequest { - default String progressToken() { + default Object progressToken() { if (meta() != null && meta().containsKey("progressToken")) { - return meta().get("progressToken").toString(); + return meta().get("progressToken"); } return null; } @@ -277,12 +277,12 @@ public record JSONRPCNotification( // @formatter:off } /** - * A successful (non-error) response to a request. + * A response to a request (successful, or error). * * @param jsonrpc The JSON-RPC version (must be "2.0") * @param id The request identifier that this response corresponds to - * @param result The result of the successful request - * @param error Error information if the request failed + * @param result The result of the successful request; null if error + * @param error Error information if the request failed; null if has result */ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) @@ -1502,7 +1502,7 @@ public Builder meta(Map meta) { return this; } - public Builder progressToken(String progressToken) { + public Builder progressToken(Object progressToken) { if (this.meta == null) { this.meta = new HashMap<>(); } @@ -1912,7 +1912,7 @@ public Builder meta(Map meta) { return this; } - public Builder progressToken(String progressToken) { + public Builder progressToken(Object progressToken) { if (this.meta == null) { this.meta = new HashMap<>(); } @@ -2080,7 +2080,7 @@ public Builder meta(Map meta) { return this; } - public Builder progressToken(String progressToken) { + public Builder progressToken(Object progressToken) { if (this.meta == null) { this.meta = new HashMap<>(); } @@ -2217,13 +2217,13 @@ public record PaginatedResult(@JsonProperty("nextCursor") String nextCursor) { @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonIgnoreProperties(ignoreUnknown = true) public record ProgressNotification( // @formatter:off - @JsonProperty("progressToken") String progressToken, + @JsonProperty("progressToken") Object progressToken, @JsonProperty("progress") Double progress, @JsonProperty("total") Double total, @JsonProperty("message") String message, @JsonProperty("_meta") Map meta) implements Notification { // @formatter:on - public ProgressNotification(String progressToken, double progress, Double total, String message) { + public ProgressNotification(Object progressToken, double progress, Double total, String message) { this(progressToken, progress, total, message, null); } } diff --git a/mcp-core/src/test/java/io/modelcontextprotocol/spec/McpClientSessionTests.java b/mcp-core/src/test/java/io/modelcontextprotocol/spec/McpClientSessionTests.java index 86912b4bf..3de06f503 100644 --- a/mcp-core/src/test/java/io/modelcontextprotocol/spec/McpClientSessionTests.java +++ b/mcp-core/src/test/java/io/modelcontextprotocol/spec/McpClientSessionTests.java @@ -6,11 +6,10 @@ import java.time.Duration; import java.util.Map; +import java.util.function.Function; import io.modelcontextprotocol.MockMcpClientTransport; import io.modelcontextprotocol.json.TypeRef; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,7 +18,6 @@ import reactor.test.StepVerifier; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * Test suite for {@link McpClientSession} that verifies its JSON-RPC message handling, @@ -39,35 +37,6 @@ class McpClientSessionTests { private static final String ECHO_METHOD = "echo"; - private McpClientSession session; - - private MockMcpClientTransport transport; - - @BeforeEach - void setUp() { - transport = new MockMcpClientTransport(); - session = new McpClientSession(TIMEOUT, transport, Map.of(), - Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params)))); - } - - @AfterEach - void tearDown() { - if (session != null) { - session.close(); - } - } - - @Test - void testConstructorWithInvalidArguments() { - assertThatThrownBy(() -> new McpClientSession(null, transport, Map.of(), Map.of())) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("The requestTimeout can not be null"); - - assertThatThrownBy(() -> new McpClientSession(TIMEOUT, null, Map.of(), Map.of())) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("transport can not be null"); - } - TypeRef responseType = new TypeRef<>() { }; @@ -76,6 +45,11 @@ void testSendRequest() { String testParam = "test parameter"; String responseData = "test response"; + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(), + Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params))), + Function.identity()); + // Create a Mono that will emit the response after the request is sent Mono responseMono = session.sendRequest(TEST_METHOD, testParam, responseType); // Verify response handling @@ -92,10 +66,17 @@ void testSendRequest() { assertThat(request.params()).isEqualTo(testParam); assertThat(response).isEqualTo(responseData); }).verifyComplete(); + + session.close(); } @Test void testSendRequestWithError() { + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(), + Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params))), + Function.identity()); + Mono responseMono = session.sendRequest(TEST_METHOD, "test", responseType); // Verify error handling @@ -107,20 +88,34 @@ void testSendRequestWithError() { transport.simulateIncomingMessage( new McpSchema.JSONRPCResponse(McpSchema.JSONRPC_VERSION, request.id(), null, error)); }).expectError(McpError.class).verify(); + + session.close(); } @Test void testRequestTimeout() { + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(), + Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params))), + Function.identity()); + Mono responseMono = session.sendRequest(TEST_METHOD, "test", responseType); // Verify timeout StepVerifier.create(responseMono) .expectError(java.util.concurrent.TimeoutException.class) .verify(TIMEOUT.plusSeconds(1)); + + session.close(); } @Test void testSendNotification() { + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(), + Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params))), + Function.identity()); + Map params = Map.of("key", "value"); Mono notificationMono = session.sendNotification(TEST_NOTIFICATION, params); @@ -132,6 +127,8 @@ void testSendNotification() { assertThat(notification.method()).isEqualTo(TEST_NOTIFICATION); assertThat(notification.params()).isEqualTo(params); }).verifyComplete(); + + session.close(); } @Test @@ -139,8 +136,8 @@ void testRequestHandling() { String echoMessage = "Hello MCP!"; Map> requestHandlers = Map.of(ECHO_METHOD, params -> Mono.just(params)); - transport = new MockMcpClientTransport(); - session = new McpClientSession(TIMEOUT, transport, requestHandlers, Map.of()); + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, requestHandlers, Map.of(), Function.identity()); // Simulate incoming request McpSchema.JSONRPCRequest request = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, ECHO_METHOD, @@ -153,15 +150,18 @@ void testRequestHandling() { McpSchema.JSONRPCResponse response = (McpSchema.JSONRPCResponse) sentMessage; assertThat(response.result()).isEqualTo(echoMessage); assertThat(response.error()).isNull(); + + session.close(); } @Test void testNotificationHandling() { Sinks.One receivedParams = Sinks.one(); - transport = new MockMcpClientTransport(); - session = new McpClientSession(TIMEOUT, transport, Map.of(), - Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> receivedParams.tryEmitValue(params)))); + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(), + Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> receivedParams.tryEmitValue(params))), + Function.identity()); // Simulate incoming notification from the server Map notificationParams = Map.of("status", "ready"); @@ -173,10 +173,18 @@ void testNotificationHandling() { // Verify handler was called assertThat(receivedParams.asMono().block(Duration.ofSeconds(1))).isEqualTo(notificationParams); + + session.close(); } @Test void testUnknownMethodHandling() { + + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(), + Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params))), + Function.identity()); + // Simulate incoming request for unknown method McpSchema.JSONRPCRequest request = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, "unknown.method", "test-id", null); @@ -188,10 +196,117 @@ void testUnknownMethodHandling() { McpSchema.JSONRPCResponse response = (McpSchema.JSONRPCResponse) sentMessage; assertThat(response.error()).isNotNull(); assertThat(response.error().code()).isEqualTo(McpSchema.ErrorCodes.METHOD_NOT_FOUND); + + session.close(); + } + + @Test + void testRequestHandlerThrowsMcpErrorWithJsonRpcError() { + // Setup: Create a request handler that throws McpError with custom error code and + // data + String testMethod = "test.customError"; + Map errorData = Map.of("customField", "customValue"); + McpClientSession.RequestHandler failingHandler = params -> Mono + .error(McpError.builder(123).message("Custom error message").data(errorData).build()); + + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(testMethod, failingHandler), Map.of(), + Function.identity()); + + // Simulate incoming request that will trigger the error + McpSchema.JSONRPCRequest request = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, testMethod, + "test-id", null); + transport.simulateIncomingMessage(request); + + // Verify: The response should contain the custom error from McpError + McpSchema.JSONRPCMessage sentMessage = transport.getLastSentMessage(); + assertThat(sentMessage).isInstanceOf(McpSchema.JSONRPCResponse.class); + McpSchema.JSONRPCResponse response = (McpSchema.JSONRPCResponse) sentMessage; + assertThat(response.error()).isNotNull(); + assertThat(response.error().code()).isEqualTo(123); + assertThat(response.error().message()).isEqualTo("Custom error message"); + assertThat(response.error().data()).isEqualTo(errorData); + + session.close(); + } + + @Test + void testRequestHandlerThrowsGenericException() { + // Setup: Create a request handler that throws a generic RuntimeException + String testMethod = "test.genericError"; + RuntimeException exception = new RuntimeException("Something went wrong"); + McpClientSession.RequestHandler failingHandler = params -> Mono.error(exception); + + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(testMethod, failingHandler), Map.of(), + Function.identity()); + + // Simulate incoming request that will trigger the error + McpSchema.JSONRPCRequest request = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, testMethod, + "test-id", null); + transport.simulateIncomingMessage(request); + + // Verify: The response should contain INTERNAL_ERROR with aggregated exception + // messages in data field + McpSchema.JSONRPCMessage sentMessage = transport.getLastSentMessage(); + assertThat(sentMessage).isInstanceOf(McpSchema.JSONRPCResponse.class); + McpSchema.JSONRPCResponse response = (McpSchema.JSONRPCResponse) sentMessage; + assertThat(response.error()).isNotNull(); + assertThat(response.error().code()).isEqualTo(McpSchema.ErrorCodes.INTERNAL_ERROR); + assertThat(response.error().message()).isEqualTo("Something went wrong"); + // Verify data field contains aggregated exception messages + assertThat(response.error().data()).isNotNull(); + assertThat(response.error().data().toString()).contains("RuntimeException"); + assertThat(response.error().data().toString()).contains("Something went wrong"); + + session.close(); + } + + @Test + void testRequestHandlerThrowsExceptionWithCause() { + // Setup: Create a request handler that throws an exception with a cause chain + String testMethod = "test.chainedError"; + RuntimeException rootCause = new IllegalArgumentException("Root cause message"); + RuntimeException middleCause = new IllegalStateException("Middle cause message", rootCause); + RuntimeException topException = new RuntimeException("Top level message", middleCause); + McpClientSession.RequestHandler failingHandler = params -> Mono.error(topException); + + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(testMethod, failingHandler), Map.of(), + Function.identity()); + + // Simulate incoming request that will trigger the error + McpSchema.JSONRPCRequest request = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, testMethod, + "test-id", null); + transport.simulateIncomingMessage(request); + + // Verify: The response should contain INTERNAL_ERROR with full exception chain + // in data field + McpSchema.JSONRPCMessage sentMessage = transport.getLastSentMessage(); + assertThat(sentMessage).isInstanceOf(McpSchema.JSONRPCResponse.class); + McpSchema.JSONRPCResponse response = (McpSchema.JSONRPCResponse) sentMessage; + assertThat(response.error()).isNotNull(); + assertThat(response.error().code()).isEqualTo(McpSchema.ErrorCodes.INTERNAL_ERROR); + assertThat(response.error().message()).isEqualTo("Top level message"); + // Verify data field contains the full exception chain + String dataString = response.error().data().toString(); + assertThat(dataString).contains("RuntimeException"); + assertThat(dataString).contains("Top level message"); + assertThat(dataString).contains("IllegalStateException"); + assertThat(dataString).contains("Middle cause message"); + assertThat(dataString).contains("IllegalArgumentException"); + assertThat(dataString).contains("Root cause message"); + + session.close(); } @Test void testGracefulShutdown() { + var transport = new MockMcpClientTransport(); + var session = new McpClientSession(TIMEOUT, transport, Map.of(), + Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params))), + Function.identity()); + StepVerifier.create(session.closeGracefully()).verifyComplete(); } diff --git a/mcp-json-jackson2/pom.xml b/mcp-json-jackson2/pom.xml index e53d5e57b..c444c47b5 100644 --- a/mcp-json-jackson2/pom.xml +++ b/mcp-json-jackson2/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 mcp-json-jackson2 jar @@ -37,7 +37,7 @@ io.modelcontextprotocol.sdk mcp-json - 0.15.0-SNAPSHOT + 0.16.0 com.fasterxml.jackson.core diff --git a/mcp-json-jackson2/src/main/java/io/modelcontextprotocol/json/schema/jackson/DefaultJsonSchemaValidator.java b/mcp-json-jackson2/src/main/java/io/modelcontextprotocol/json/schema/jackson/DefaultJsonSchemaValidator.java index 15511c9c2..1ff28cb80 100644 --- a/mcp-json-jackson2/src/main/java/io/modelcontextprotocol/json/schema/jackson/DefaultJsonSchemaValidator.java +++ b/mcp-json-jackson2/src/main/java/io/modelcontextprotocol/json/schema/jackson/DefaultJsonSchemaValidator.java @@ -3,17 +3,17 @@ */ package io.modelcontextprotocol.json.schema.jackson; +import java.util.List; import java.util.Map; -import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.networknt.schema.JsonSchema; -import com.networknt.schema.JsonSchemaFactory; -import com.networknt.schema.SpecVersion; -import com.networknt.schema.ValidationMessage; +import com.networknt.schema.Schema; +import com.networknt.schema.SchemaRegistry; +import com.networknt.schema.Error; +import com.networknt.schema.dialect.Dialects; import io.modelcontextprotocol.json.schema.JsonSchemaValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -31,10 +31,10 @@ public class DefaultJsonSchemaValidator implements JsonSchemaValidator { private final ObjectMapper objectMapper; - private final JsonSchemaFactory schemaFactory; + private final SchemaRegistry schemaFactory; // TODO: Implement a strategy to purge the cache (TTL, size limit, etc.) - private final ConcurrentHashMap schemaCache; + private final ConcurrentHashMap schemaCache; public DefaultJsonSchemaValidator() { this(new ObjectMapper()); @@ -42,7 +42,7 @@ public DefaultJsonSchemaValidator() { public DefaultJsonSchemaValidator(ObjectMapper objectMapper) { this.objectMapper = objectMapper; - this.schemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V202012); + this.schemaFactory = SchemaRegistry.withDialect(Dialects.getDraft202012()); this.schemaCache = new ConcurrentHashMap<>(); } @@ -62,7 +62,7 @@ public ValidationResponse validate(Map schema, Object structured ? this.objectMapper.readTree((String) structuredContent) : this.objectMapper.valueToTree(structuredContent); - Set validationResult = this.getOrCreateJsonSchema(schema).validate(jsonStructuredOutput); + List validationResult = this.getOrCreateJsonSchema(schema).validate(jsonStructuredOutput); // Check if validation passed if (!validationResult.isEmpty()) { @@ -85,36 +85,36 @@ public ValidationResponse validate(Map schema, Object structured } /** - * Gets a cached JsonSchema or creates and caches a new one. + * Gets a cached Schema or creates and caches a new one. * @param schema the schema map to convert - * @return the compiled JsonSchema + * @return the compiled Schema * @throws JsonProcessingException if schema processing fails */ - private JsonSchema getOrCreateJsonSchema(Map schema) throws JsonProcessingException { + private Schema getOrCreateJsonSchema(Map schema) throws JsonProcessingException { // Generate cache key based on schema content String cacheKey = this.generateCacheKey(schema); // Try to get from cache first - JsonSchema cachedSchema = this.schemaCache.get(cacheKey); + Schema cachedSchema = this.schemaCache.get(cacheKey); if (cachedSchema != null) { return cachedSchema; } // Create new schema if not in cache - JsonSchema newSchema = this.createJsonSchema(schema); + Schema newSchema = this.createJsonSchema(schema); // Cache the schema - JsonSchema existingSchema = this.schemaCache.putIfAbsent(cacheKey, newSchema); + Schema existingSchema = this.schemaCache.putIfAbsent(cacheKey, newSchema); return existingSchema != null ? existingSchema : newSchema; } /** - * Creates a new JsonSchema from the given schema map. + * Creates a new Schema from the given schema map. * @param schema the schema map - * @return the compiled JsonSchema + * @return the compiled Schema * @throws JsonProcessingException if schema processing fails */ - private JsonSchema createJsonSchema(Map schema) throws JsonProcessingException { + private Schema createJsonSchema(Map schema) throws JsonProcessingException { // Convert schema map directly to JsonNode (more efficient than string // serialization) JsonNode schemaNode = this.objectMapper.valueToTree(schema); diff --git a/mcp-json/pom.xml b/mcp-json/pom.xml index 790b056c6..1dd173efe 100644 --- a/mcp-json/pom.xml +++ b/mcp-json/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 mcp-json jar diff --git a/mcp-spring/mcp-spring-webflux/pom.xml b/mcp-spring/mcp-spring-webflux/pom.xml index 785ebd746..6490dd922 100644 --- a/mcp-spring/mcp-spring-webflux/pom.xml +++ b/mcp-spring/mcp-spring-webflux/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 ../../pom.xml mcp-spring-webflux @@ -25,19 +25,19 @@ io.modelcontextprotocol.sdk mcp-json-jackson2 - 0.15.0-SNAPSHOT + 0.16.0 io.modelcontextprotocol.sdk mcp - 0.15.0-SNAPSHOT + 0.16.0 io.modelcontextprotocol.sdk mcp-test - 0.15.0-SNAPSHOT + 0.16.0 test diff --git a/mcp-spring/mcp-spring-webmvc/pom.xml b/mcp-spring/mcp-spring-webmvc/pom.xml index 3dc0e13f9..73a41cd44 100644 --- a/mcp-spring/mcp-spring-webmvc/pom.xml +++ b/mcp-spring/mcp-spring-webmvc/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 ../../pom.xml mcp-spring-webmvc @@ -25,13 +25,13 @@ io.modelcontextprotocol.sdk mcp-json-jackson2 - 0.15.0-SNAPSHOT + 0.16.0 io.modelcontextprotocol.sdk mcp - 0.15.0-SNAPSHOT + 0.16.0 @@ -43,14 +43,14 @@ io.modelcontextprotocol.sdk mcp-test - 0.15.0-SNAPSHOT + 0.16.0 test io.modelcontextprotocol.sdk mcp-spring-webflux - 0.15.0-SNAPSHOT + 0.16.0 test diff --git a/mcp-test/pom.xml b/mcp-test/pom.xml index 27560e10e..85848e65f 100644 --- a/mcp-test/pom.xml +++ b/mcp-test/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 mcp-test jar @@ -24,7 +24,7 @@ io.modelcontextprotocol.sdk mcp - 0.15.0-SNAPSHOT + 0.16.0 diff --git a/mcp/pom.xml b/mcp/pom.xml index 412f7dc6b..7dfd89b1e 100644 --- a/mcp/pom.xml +++ b/mcp/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 mcp jar @@ -25,13 +25,13 @@ io.modelcontextprotocol.sdk mcp-json-jackson2 - 0.15.0-SNAPSHOT + 0.16.0 io.modelcontextprotocol.sdk mcp-core - 0.15.0-SNAPSHOT + 0.16.0 diff --git a/pom.xml b/pom.xml index 2cd141863..96c8c33a3 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.modelcontextprotocol.sdk mcp-parent - 0.15.0-SNAPSHOT + 0.16.0 pom https://github.com/modelcontextprotocol/java-sdk @@ -96,7 +96,7 @@ 4.2.0 7.1.0 4.1.0 - 1.5.7 + 2.0.0