Skip to content

Commit 84adde1

Browse files
mackey0225tzolov
authored andcommitted
fix: correct typos in variable names, method names, and commentsj (#159)
1 parent f7f8ccd commit 84adde1

File tree

11 files changed

+32
-32
lines changed

11 files changed

+32
-32
lines changed

mcp-spring/mcp-spring-webflux/src/main/java/io/modelcontextprotocol/server/transport/WebFluxSseServerTransportProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public WebFluxSseServerTransportProvider(ObjectMapper objectMapper, String messa
141141
* Constructs a new WebFlux SSE server transport provider instance.
142142
* @param objectMapper The ObjectMapper to use for JSON serialization/deserialization
143143
* of MCP messages. Must not be null.
144-
* @param baseUrl webflux messag base path
144+
* @param baseUrl webflux message base path
145145
* @param messageEndpoint The endpoint URI where clients should send their JSON-RPC
146146
* messages. This endpoint will be communicated to clients during SSE connection
147147
* setup. Must not be null.

mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/WebFluxSseIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void testCreateMessageSuccess(String clientType) {
152152
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
153153
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
154154

155-
var craeteMessageRequest = McpSchema.CreateMessageRequest.builder()
155+
var createMessageRequest = McpSchema.CreateMessageRequest.builder()
156156
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
157157
new McpSchema.TextContent("Test message"))))
158158
.modelPreferences(ModelPreferences.builder()
@@ -163,7 +163,7 @@ void testCreateMessageSuccess(String clientType) {
163163
.build())
164164
.build();
165165

166-
return exchange.createMessage(craeteMessageRequest)
166+
return exchange.createMessage(createMessageRequest)
167167
.doOnNext(samplingResult::set)
168168
.thenReturn(callResponse);
169169
});
@@ -421,7 +421,7 @@ void testRootsWithoutCapability(String clientType) {
421421

422422
@ParameterizedTest(name = "{0} : {displayName} ")
423423
@ValueSource(strings = { "httpclient", "webflux" })
424-
void testRootsNotifciationWithEmptyRootsList(String clientType) {
424+
void testRootsNotificationWithEmptyRootsList(String clientType) {
425425
var clientBuilder = clientBuilders.get(clientType);
426426

427427
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();

mcp-spring/mcp-spring-webmvc/src/test/java/io/modelcontextprotocol/server/WebMvcSseIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void testCreateMessageSuccess() {
169169
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
170170
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
171171

172-
var craeteMessageRequest = McpSchema.CreateMessageRequest.builder()
172+
var createMessageRequest = McpSchema.CreateMessageRequest.builder()
173173
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
174174
new McpSchema.TextContent("Test message"))))
175175
.modelPreferences(ModelPreferences.builder()
@@ -180,7 +180,7 @@ void testCreateMessageSuccess() {
180180
.build())
181181
.build();
182182

183-
StepVerifier.create(exchange.createMessage(craeteMessageRequest)).consumeNextWith(result -> {
183+
StepVerifier.create(exchange.createMessage(createMessageRequest)).consumeNextWith(result -> {
184184
assertThat(result).isNotNull();
185185
assertThat(result.role()).isEqualTo(Role.USER);
186186
assertThat(result.content()).isInstanceOf(McpSchema.TextContent.class);
@@ -438,7 +438,7 @@ void testRootsWithoutCapability() {
438438
}
439439

440440
@Test
441-
void testRootsNotifciationWithEmptyRootsList() {
441+
void testRootsNotificationWithEmptyRootsList() {
442442
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
443443

444444
var mcpServer = McpServer.sync(mcpServerTransportProvider)

mcp-test/src/main/java/io/modelcontextprotocol/server/AbstractMcpAsyncServerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void testAddTool() {
110110
.build();
111111

112112
StepVerifier.create(mcpAsyncServer.addTool(new McpServerFeatures.AsyncToolSpecification(newTool,
113-
(excnage, args) -> Mono.just(new CallToolResult(List.of(), false)))))
113+
(exchange, args) -> Mono.just(new CallToolResult(List.of(), false)))))
114114
.verifyComplete();
115115

116116
assertThatCode(() -> mcpAsyncServer.closeGracefully().block(Duration.ofSeconds(10))).doesNotThrowAnyException();

mcp-test/src/main/java/io/modelcontextprotocol/server/AbstractMcpSyncServerTests.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -200,16 +200,16 @@ void testAddResource() {
200200

201201
Resource resource = new Resource(TEST_RESOURCE_URI, "Test Resource", "text/plain", "Test resource description",
202202
null);
203-
McpServerFeatures.SyncResourceSpecification specificaiton = new McpServerFeatures.SyncResourceSpecification(
203+
McpServerFeatures.SyncResourceSpecification specification = new McpServerFeatures.SyncResourceSpecification(
204204
resource, (exchange, req) -> new ReadResourceResult(List.of()));
205205

206-
assertThatCode(() -> mcpSyncServer.addResource(specificaiton)).doesNotThrowAnyException();
206+
assertThatCode(() -> mcpSyncServer.addResource(specification)).doesNotThrowAnyException();
207207

208208
assertThatCode(() -> mcpSyncServer.closeGracefully()).doesNotThrowAnyException();
209209
}
210210

211211
@Test
212-
void testAddResourceWithNullSpecifiation() {
212+
void testAddResourceWithNullSpecification() {
213213
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
214214
.serverInfo("test-server", "1.0.0")
215215
.capabilities(ServerCapabilities.builder().resources(true, false).build())
@@ -279,11 +279,11 @@ void testAddPromptWithoutCapability() {
279279
.build();
280280

281281
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
282-
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
282+
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
283283
(exchange, req) -> new GetPromptResult("Test prompt description", List
284284
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
285285

286-
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specificaiton)).isInstanceOf(McpError.class)
286+
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specification)).isInstanceOf(McpError.class)
287287
.hasMessage("Server must be configured with prompt capabilities");
288288
}
289289

@@ -300,14 +300,14 @@ void testRemovePromptWithoutCapability() {
300300
@Test
301301
void testRemovePrompt() {
302302
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
303-
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
303+
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
304304
(exchange, req) -> new GetPromptResult("Test prompt description", List
305305
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
306306

307307
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
308308
.serverInfo("test-server", "1.0.0")
309309
.capabilities(ServerCapabilities.builder().prompts(true).build())
310-
.prompts(specificaiton)
310+
.prompts(specification)
311311
.build();
312312

313313
assertThatCode(() -> mcpSyncServer.removePrompt(TEST_PROMPT_NAME)).doesNotThrowAnyException();
@@ -340,7 +340,7 @@ void testRootsChangeHandlers() {
340340

341341
var singleConsumerServer = McpServer.sync(createMcpTransportProvider())
342342
.serverInfo("test-server", "1.0.0")
343-
.rootsChangeHandlers(List.of((exchage, roots) -> {
343+
.rootsChangeHandlers(List.of((exchange, roots) -> {
344344
consumerCalled[0] = true;
345345
if (!roots.isEmpty()) {
346346
rootsReceived[0] = roots.get(0);

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public SyncSpec requestTimeout(Duration requestTimeout) {
196196
}
197197

198198
/**
199-
* @param initializationTimeout The duration to wait for the initializaiton
199+
* @param initializationTimeout The duration to wait for the initialization
200200
* lifecycle step to complete.
201201
* @return This builder instance for method chaining
202202
* @throws IllegalArgumentException if initializationTimeout is null
@@ -435,7 +435,7 @@ public AsyncSpec requestTimeout(Duration requestTimeout) {
435435
}
436436

437437
/**
438-
* @param initializationTimeout The duration to wait for the initializaiton
438+
* @param initializationTimeout The duration to wait for the initialization
439439
* lifecycle step to complete.
440440
* @return This builder instance for method chaining
441441
* @throws IllegalArgumentException if initializationTimeout is null

mcp/src/main/java/io/modelcontextprotocol/server/McpAsyncServer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ private Mono<McpSchema.InitializeResult> asyncInitializeRequestHandler(
359359
}
360360
else {
361361
logger.warn(
362-
"Client requested unsupported protocol version: {}, so the server will sugggest the {} version instead",
362+
"Client requested unsupported protocol version: {}, so the server will suggest the {} version instead",
363363
initializeRequest.protocolVersion(), serverProtocolVersion);
364364
}
365365

mcp/src/main/java/io/modelcontextprotocol/spec/McpSchema.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ public record ProgressNotification(// @formatter:off
11031103
* setting minimum log levels, with servers sending notifications containing severity
11041104
* levels, optional logger names, and arbitrary JSON-serializable data.
11051105
*
1106-
* @param level The severity levels. The mimimum log level is set by the client.
1106+
* @param level The severity levels. The minimum log level is set by the client.
11071107
* @param logger The logger that generated the message.
11081108
* @param data JSON-serializable logging data.
11091109
*/

mcp/src/test/java/io/modelcontextprotocol/server/AbstractMcpAsyncServerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void testAddTool() {
109109
.build();
110110

111111
StepVerifier.create(mcpAsyncServer.addTool(new McpServerFeatures.AsyncToolSpecification(newTool,
112-
(excnage, args) -> Mono.just(new CallToolResult(List.of(), false)))))
112+
(exchange, args) -> Mono.just(new CallToolResult(List.of(), false)))))
113113
.verifyComplete();
114114

115115
assertThatCode(() -> mcpAsyncServer.closeGracefully().block(Duration.ofSeconds(10))).doesNotThrowAnyException();

mcp/src/test/java/io/modelcontextprotocol/server/AbstractMcpSyncServerTests.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,16 @@ void testAddResource() {
199199

200200
Resource resource = new Resource(TEST_RESOURCE_URI, "Test Resource", "text/plain", "Test resource description",
201201
null);
202-
McpServerFeatures.SyncResourceSpecification specificaiton = new McpServerFeatures.SyncResourceSpecification(
202+
McpServerFeatures.SyncResourceSpecification specification = new McpServerFeatures.SyncResourceSpecification(
203203
resource, (exchange, req) -> new ReadResourceResult(List.of()));
204204

205-
assertThatCode(() -> mcpSyncServer.addResource(specificaiton)).doesNotThrowAnyException();
205+
assertThatCode(() -> mcpSyncServer.addResource(specification)).doesNotThrowAnyException();
206206

207207
assertThatCode(() -> mcpSyncServer.closeGracefully()).doesNotThrowAnyException();
208208
}
209209

210210
@Test
211-
void testAddResourceWithNullSpecifiation() {
211+
void testAddResourceWithNullSpecification() {
212212
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
213213
.serverInfo("test-server", "1.0.0")
214214
.capabilities(ServerCapabilities.builder().resources(true, false).build())
@@ -278,11 +278,11 @@ void testAddPromptWithoutCapability() {
278278
.build();
279279

280280
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
281-
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
281+
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
282282
(exchange, req) -> new GetPromptResult("Test prompt description", List
283283
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
284284

285-
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specificaiton)).isInstanceOf(McpError.class)
285+
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specification)).isInstanceOf(McpError.class)
286286
.hasMessage("Server must be configured with prompt capabilities");
287287
}
288288

@@ -299,14 +299,14 @@ void testRemovePromptWithoutCapability() {
299299
@Test
300300
void testRemovePrompt() {
301301
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
302-
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
302+
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
303303
(exchange, req) -> new GetPromptResult("Test prompt description", List
304304
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
305305

306306
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
307307
.serverInfo("test-server", "1.0.0")
308308
.capabilities(ServerCapabilities.builder().prompts(true).build())
309-
.prompts(specificaiton)
309+
.prompts(specification)
310310
.build();
311311

312312
assertThatCode(() -> mcpSyncServer.removePrompt(TEST_PROMPT_NAME)).doesNotThrowAnyException();
@@ -339,7 +339,7 @@ void testRootsChangeHandlers() {
339339

340340
var singleConsumerServer = McpServer.sync(createMcpTransportProvider())
341341
.serverInfo("test-server", "1.0.0")
342-
.rootsChangeHandlers(List.of((exchage, roots) -> {
342+
.rootsChangeHandlers(List.of((exchange, roots) -> {
343343
consumerCalled[0] = true;
344344
if (!roots.isEmpty()) {
345345
rootsReceived[0] = roots.get(0);

mcp/src/test/java/io/modelcontextprotocol/server/transport/HttpServletSseServerTransportProviderIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void testCreateMessageSuccess() {
152152
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
153153
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
154154

155-
var craeteMessageRequest = McpSchema.CreateMessageRequest.builder()
155+
var createMessageRequest = McpSchema.CreateMessageRequest.builder()
156156
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
157157
new McpSchema.TextContent("Test message"))))
158158
.modelPreferences(ModelPreferences.builder()
@@ -163,7 +163,7 @@ void testCreateMessageSuccess() {
163163
.build())
164164
.build();
165165

166-
StepVerifier.create(exchange.createMessage(craeteMessageRequest)).consumeNextWith(result -> {
166+
StepVerifier.create(exchange.createMessage(createMessageRequest)).consumeNextWith(result -> {
167167
assertThat(result).isNotNull();
168168
assertThat(result.role()).isEqualTo(Role.USER);
169169
assertThat(result.content()).isInstanceOf(McpSchema.TextContent.class);
@@ -417,7 +417,7 @@ void testRootsWithoutCapability() {
417417
}
418418

419419
@Test
420-
void testRootsNotifciationWithEmptyRootsList() {
420+
void testRootsNotificationWithEmptyRootsList() {
421421
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
422422

423423
var mcpServer = McpServer.sync(mcpServerTransportProvider)

0 commit comments

Comments
 (0)