fix: correct MCPServer call_tool result type (#2816)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
f253682393
commit
fda4c54362
1 changed files with 63 additions and 45 deletions
|
|
@ -8,6 +8,17 @@ Version 2 of the MCP Python SDK introduces several breaking changes to improve t
|
|||
|
||||
## Breaking Changes
|
||||
|
||||
### `MCPServer.call_tool()` returns `CallToolResult`
|
||||
|
||||
`MCPServer.call_tool()` now always returns a `CallToolResult`. It previously
|
||||
advertised `Sequence[ContentBlock] | dict[str, Any]` and leaked the internal
|
||||
conversion shapes (a bare content sequence or a `(content, structured_content)`
|
||||
tuple), forcing callers to re-assemble a `CallToolResult` themselves.
|
||||
|
||||
If you call `MCPServer.call_tool()` directly, read `.content` and
|
||||
`.structured_content` off the returned `CallToolResult` instead of branching on
|
||||
the result type.
|
||||
|
||||
### `streamablehttp_client` removed
|
||||
|
||||
The deprecated `streamablehttp_client` function has been removed. Use `streamable_http_client` instead.
|
||||
|
|
|
|||
Loading…
Reference in a new issue