feat(mcp): Update to MCP SDK 0.8.0-SNAPSHOT and fix client initialization
- Make MCP client initialization blocking with .block() call - Upgrade MCP SDK version from 0.7.0 to 0.8.0-SNAPSHOT Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
committed by
Ilayaperumal Gopinathan
parent
206b9e220a
commit
72bb5ca296
@@ -268,7 +268,7 @@ public class McpClientAutoConfiguration {
|
||||
var syncClient = syncSpec.build();
|
||||
|
||||
if (commonProperties.isInitialized()) {
|
||||
syncClient.initialize();
|
||||
syncClient.initialize().block();
|
||||
}
|
||||
|
||||
mcpSyncClients.add(syncClient);
|
||||
|
||||
@@ -142,8 +142,9 @@ public final class McpToolUtils {
|
||||
try {
|
||||
String callResult = toolCallback.call(ModelOptionsUtils.toJsonString(request));
|
||||
if (mimeType != null && mimeType.toString().startsWith("image")) {
|
||||
return new McpSchema.CallToolResult(List.of(new McpSchema.ImageContent(List.of(Role.ASSISTANT),
|
||||
null, "image", callResult, mimeType.toString())), false);
|
||||
return new McpSchema.CallToolResult(List
|
||||
.of(new McpSchema.ImageContent(List.of(Role.ASSISTANT), null, callResult, mimeType.toString())),
|
||||
false);
|
||||
}
|
||||
return new McpSchema.CallToolResult(List.of(new McpSchema.TextContent(callResult)), false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user