@@ -401,13 +401,13 @@ Example usage:
401401@Component
402402public class McpClientHandlers {
403403
404- @McpLogging
404+ @McpLogging(clients = "server1")
405405 public void handleLoggingMessage(LoggingMessageNotification notification) {
406406 System.out.println("Received log: " + notification.level() +
407407 " - " + notification.data());
408408 }
409409
410- @McpSampling
410+ @McpSampling(clients = "server1")
411411 public CreateMessageResult handleSamplingRequest(CreateMessageRequest request) {
412412 // Process the request and generate a response
413413 String response = generateLLMResponse(request);
@@ -419,14 +419,14 @@ public class McpClientHandlers {
419419 .build();
420420 }
421421
422- @McpProgress
422+ @McpProgress(clients = "server1")
423423 public void handleProgressNotification(ProgressNotification notification) {
424424 double percentage = notification.progress() * 100;
425425 System.out.println(String.format("Progress: %.2f%% - %s",
426426 percentage, notification.message()));
427427 }
428428
429- @McpToolListChanged
429+ @McpToolListChanged(clients = "server1")
430430 public void handleToolListChanged(List<McpSchema.Tool> updatedTools) {
431431 System.out.println("Tool list updated: " + updatedTools.size() + " tools available");
432432 // Update local tool registry
@@ -445,7 +445,7 @@ public void handleServer1Logs(LoggingMessageNotification notification) {
445445 logToFile("server1.log", notification);
446446}
447447
448- @McpSampling
448+ @McpSampling(clients = "server1")
449449public Mono<CreateMessageResult> handleAsyncSampling(CreateMessageRequest request) {
450450 return Mono.fromCallable(() -> {
451451 String response = generateLLMResponse(request);
0 commit comments