diff --git a/model-context-protocol/mcp-annotations/mcp-annotations-client/src/main/java/org/springframework/ai/mcp/samples/client/McpClientHandlerProviders.java b/model-context-protocol/mcp-annotations/mcp-annotations-client/src/main/java/org/springframework/ai/mcp/samples/client/McpClientHandlerProviders.java index 91c2ea9..770023f 100644 --- a/model-context-protocol/mcp-annotations/mcp-annotations-client/src/main/java/org/springframework/ai/mcp/samples/client/McpClientHandlerProviders.java +++ b/model-context-protocol/mcp-annotations/mcp-annotations-client/src/main/java/org/springframework/ai/mcp/samples/client/McpClientHandlerProviders.java @@ -1,7 +1,5 @@ package org.springframework.ai.mcp.samples.client; -import java.util.Map; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springaicommunity.mcp.annotation.McpElicitation; @@ -32,7 +30,7 @@ public class McpClientHandlerProviders { *
  • {@code spring.ai.mcp.client.sse.connections.server1.url=...}
  • *
  • {@code spring.ai.mcp.client.streamable-http.connections.server1.url=...}
  • * - * + * * The handler is assigned only to the client with ID "server1". * * @param progressNotification the progress notification received from the server diff --git a/model-context-protocol/mcp-annotations/mcp-annotations-server/src/main/java/org/springframework/ai/mcp/sample/server/providers/ToolProvider2.java b/model-context-protocol/mcp-annotations/mcp-annotations-server/src/main/java/org/springframework/ai/mcp/sample/server/providers/ToolProvider2.java index 0f15d25..0f82497 100644 --- a/model-context-protocol/mcp-annotations/mcp-annotations-server/src/main/java/org/springframework/ai/mcp/sample/server/providers/ToolProvider2.java +++ b/model-context-protocol/mcp-annotations/mcp-annotations-server/src/main/java/org/springframework/ai/mcp/sample/server/providers/ToolProvider2.java @@ -1,12 +1,12 @@ -/* +/* * Copyright 2025 - 2025 the original author or authors. -* +* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -* +* * https://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,9 +21,6 @@ import org.springaicommunity.mcp.annotation.McpProgressToken; import org.springaicommunity.mcp.annotation.McpTool; import org.springaicommunity.mcp.annotation.McpToolParam; -import org.springaicommunity.mcp.context.DefaultMcpSyncRequestContext; - -import org.springframework.stereotype.Service; import io.modelcontextprotocol.server.McpSyncServerExchange; import io.modelcontextprotocol.spec.McpSchema; @@ -50,7 +47,7 @@ public String toolLggingSamplingElicitationProgress(McpSyncServerExchange exchan new ProgressNotification(progressToken, 0.0, 1.0, "tool call start")); exchange.ping(); // call client ping - + // call elicitation var elicitationRequest = McpSchema.ElicitRequest.builder() .message("Test message") diff --git a/model-context-protocol/weather/starter-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client/StreamableHttpClient.java b/model-context-protocol/weather/starter-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client/StreamableHttpClient.java index 8b446ef..37a4e31 100644 --- a/model-context-protocol/weather/starter-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client/StreamableHttpClient.java +++ b/model-context-protocol/weather/starter-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client/StreamableHttpClient.java @@ -21,7 +21,6 @@ import io.modelcontextprotocol.client.transport.HttpClientStreamableHttpTransport; import io.modelcontextprotocol.spec.McpSchema.CallToolRequest; import io.modelcontextprotocol.spec.McpSchema.CallToolResult; -import io.modelcontextprotocol.spec.McpSchema.ListToolsResult; /** * @author Christian Tzolov @@ -29,7 +28,7 @@ public class StreamableHttpClient { public static void main(String[] args) { - + HttpClientStreamableHttpTransport transport = HttpClientStreamableHttpTransport.builder("http://localhost:8080") .build();