Skip to content

Commit 20eb848

Browse files
committed
chore: reorder client feature parameters
1 parent cec2680 commit 20eb848

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

mcp-core/src/main/java/io/modelcontextprotocol/client/McpClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,9 +970,9 @@ public McpAsyncClient build() {
970970
return new McpAsyncClient(this.transport, this.requestTimeout, this.initializationTimeout,
971971
jsonSchemaValidator,
972972
new McpClientFeatures.Async(this.clientInfo, this.capabilities, this.roots,
973-
this.toolsChangeConsumers, this.resourcesChangeConsumers, this.resourcesUpdateConsumers,
974-
this.promptsChangeConsumers, this.loggingConsumers, this.progressConsumers,
975-
this.taskStatusConsumers, this.samplingHandler, this.elicitationHandler,
973+
this.toolsChangeConsumers, this.taskStatusConsumers, this.resourcesChangeConsumers,
974+
this.resourcesUpdateConsumers, this.promptsChangeConsumers, this.loggingConsumers,
975+
this.progressConsumers, this.samplingHandler, this.elicitationHandler,
976976
this.enableCallToolSchemaCaching, this.taskPollTimeout, this.taskStore != null),
977977
this.taskStore);
978978
}

mcp-core/src/main/java/io/modelcontextprotocol/client/McpClientFeatures.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ class McpClientFeatures {
6767
*/
6868
record Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities,
6969
Map<String, McpSchema.Root> roots, List<Function<List<McpSchema.Tool>, Mono<Void>>> toolsChangeConsumers,
70+
List<Function<McpSchema.TaskStatusNotification, Mono<Void>>> taskStatusConsumers,
7071
List<Function<List<McpSchema.Resource>, Mono<Void>>> resourcesChangeConsumers,
7172
List<Function<List<McpSchema.ResourceContents>, Mono<Void>>> resourcesUpdateConsumers,
7273
List<Function<List<McpSchema.Prompt>, Mono<Void>>> promptsChangeConsumers,
7374
List<Function<McpSchema.LoggingMessageNotification, Mono<Void>>> loggingConsumers,
7475
List<Function<McpSchema.ProgressNotification, Mono<Void>>> progressConsumers,
75-
List<Function<McpSchema.TaskStatusNotification, Mono<Void>>> taskStatusConsumers,
7676
Function<McpSchema.CreateMessageRequest, Mono<McpSchema.CreateMessageResult>> samplingHandler,
7777
Function<McpSchema.ElicitRequest, Mono<McpSchema.ElicitResult>> elicitationHandler,
7878
boolean enableCallToolSchemaCaching, Duration taskPollTimeout, boolean taskStorePresent) {
@@ -93,12 +93,12 @@ record Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities c
9393
public Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities clientCapabilities,
9494
Map<String, McpSchema.Root> roots,
9595
List<Function<List<McpSchema.Tool>, Mono<Void>>> toolsChangeConsumers,
96+
List<Function<McpSchema.TaskStatusNotification, Mono<Void>>> taskStatusConsumers,
9697
List<Function<List<McpSchema.Resource>, Mono<Void>>> resourcesChangeConsumers,
9798
List<Function<List<McpSchema.ResourceContents>, Mono<Void>>> resourcesUpdateConsumers,
9899
List<Function<List<McpSchema.Prompt>, Mono<Void>>> promptsChangeConsumers,
99100
List<Function<McpSchema.LoggingMessageNotification, Mono<Void>>> loggingConsumers,
100101
List<Function<McpSchema.ProgressNotification, Mono<Void>>> progressConsumers,
101-
List<Function<McpSchema.TaskStatusNotification, Mono<Void>>> taskStatusConsumers,
102102
Function<McpSchema.CreateMessageRequest, Mono<McpSchema.CreateMessageResult>> samplingHandler,
103103
Function<McpSchema.ElicitRequest, Mono<McpSchema.ElicitResult>> elicitationHandler,
104104
boolean enableCallToolSchemaCaching, Duration taskPollTimeout, boolean taskStorePresent) {
@@ -156,9 +156,9 @@ public Async(McpSchema.Implementation clientInfo, McpSchema.ClientCapabilities c
156156
List<Function<McpSchema.LoggingMessageNotification, Mono<Void>>> loggingConsumers,
157157
Function<McpSchema.CreateMessageRequest, Mono<McpSchema.CreateMessageResult>> samplingHandler,
158158
Function<McpSchema.ElicitRequest, Mono<McpSchema.ElicitResult>> elicitationHandler) {
159-
this(clientInfo, clientCapabilities, roots, toolsChangeConsumers, resourcesChangeConsumers,
160-
resourcesUpdateConsumers, promptsChangeConsumers, loggingConsumers, List.of(), List.of(),
161-
samplingHandler, elicitationHandler, false, null, false);
159+
this(clientInfo, clientCapabilities, roots, toolsChangeConsumers, List.of(), resourcesChangeConsumers,
160+
resourcesUpdateConsumers, promptsChangeConsumers, loggingConsumers, List.of(), samplingHandler,
161+
elicitationHandler, false, null, false);
162162
}
163163

164164
/**
@@ -225,8 +225,8 @@ public static Async fromSync(Sync syncSpec) {
225225
: null;
226226

227227
return new Async(syncSpec.clientInfo(), syncSpec.clientCapabilities(), syncSpec.roots(),
228-
toolsChangeConsumers, resourcesChangeConsumers, resourcesUpdateConsumers, promptsChangeConsumers,
229-
loggingConsumers, progressConsumers, taskStatusConsumers, samplingHandler, elicitationHandler,
228+
toolsChangeConsumers, taskStatusConsumers, resourcesChangeConsumers, resourcesUpdateConsumers,
229+
promptsChangeConsumers, loggingConsumers, progressConsumers, samplingHandler, elicitationHandler,
230230
syncSpec.enableCallToolSchemaCaching(), syncSpec.taskPollTimeout(), syncSpec.taskStorePresent());
231231
}
232232
}

0 commit comments

Comments
 (0)