Skip to content

Commit e8d9c7b

Browse files
committed
Include change in the migration doc
Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
1 parent 656b6e3 commit e8d9c7b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

MIGRATION-2.0.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,16 @@ JSONRPCResponse.error(id, new JSONRPCError(code, message)); // 2-arg error
168168

169169
The 1.x canonical 4-arg constructors continue to compile.
170170

171+
### `McpStatelessSyncServer#closeGracefully` returns `void`
172+
173+
In 1.x, `McpStatelessSyncServer.closeGracefully()` accidentally leaked the reactive signature from the underlying async server and returned `Mono<Void>`. The sync API is intentionally blocking, so returning a `Mono` was an oversight — callers had to call `.block()` themselves to get any actual shutdown behaviour.
174+
175+
In 2.0 the return type is corrected to `void`; the blocking call is performed internally.
176+
177+
**Action:** Remove any `.block()` (or `.subscribe()`) call you had appended to `closeGracefully()`. The method now blocks until the server has shut down and returns normally.
178+
179+
---
180+
171181
### Optional JSON Schema validation on `tools/call` (server)
172182

173183
When a `JsonSchemaValidator` is available (including the default from `McpJsonDefaults.getSchemaValidator()` when you do not configure one explicitly) and `validateToolInputs` is left at its default of `true`, the server validates incoming tool arguments against `tool.inputSchema()` before invoking the tool. Failed validation produces a `CallToolResult` with `isError` set and a textual error in the content.

0 commit comments

Comments
 (0)