Skip to content

Commit 473f09c

Browse files
committed
docs/migration: note ClientSession.call_tool union return
1 parent d9a6317 commit 473f09c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/migration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,12 @@ For an in-process `Client(server)` (where `server` is a `Server` or `MCPServer`
364364

365365
`Client.send_ping()` is deprecated (ping is removed in 2026-07-28); pin `mode='legacy'` if you need it.
366366

367+
### `ClientSession.call_tool` returns `CallToolResult | InputRequiredResult`
368+
369+
For protocol 2026-07-28, a `tools/call` request may return an `InputRequiredResult` asking the client to supply additional input and retry. `ClientSession.call_tool` now returns `CallToolResult | InputRequiredResult` to reflect this; narrow with `isinstance(result, CallToolResult)` before reading `.content` / `.is_error` / `.structured_content`.
370+
371+
The high-level `Client.call_tool` still returns `CallToolResult` by default (and raises `RuntimeError` if the server requests input). Pass `allow_input_required=True` to receive the `InputRequiredResult` and retry with `input_responses=` / `request_state=`.
372+
367373
### `McpError` renamed to `MCPError`
368374

369375
The `McpError` exception class has been renamed to `MCPError` for consistent naming with the MCP acronym style used throughout the SDK.

0 commit comments

Comments
 (0)