You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(client): rename to initialize_result, decompose Client properties
- ClientSession.server_params -> initialize_result (avoids collision with
StdioServerParameters idiom; matches Go SDK and FastMCP)
- Client: replace server_params proxy with non-nullable server_capabilities,
server_info, server_instructions (init is guaranteed inside the context
manager, so | None was unreachable)
- Client.server_capabilities is preserved from v1 with a better type
Github-Issue: #1018
Copy file name to clipboardExpand all lines: docs/migration.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,9 +169,9 @@ result = await session.list_resources(params=PaginatedRequestParams(cursor="next
169
169
result =await session.list_tools(params=PaginatedRequestParams(cursor="next_page_token"))
170
170
```
171
171
172
-
### `ClientSession.get_server_capabilities()` replaced by `server_params` property
172
+
### `ClientSession.get_server_capabilities()` replaced by `initialize_result` property
173
173
174
-
`ClientSession` now stores the full `InitializeResult` via a `server_params` property, mirroring `ServerSession.client_params`. This is the new way to access server metadata after initialization — `server_info`, `capabilities`, `instructions`, and the negotiated `protocol_version`are all available through this single property. The `get_server_capabilities()` method has been removed.
174
+
`ClientSession` now stores the full `InitializeResult` via an `initialize_result` property. This provides access to `server_info`, `capabilities`, `instructions`, and the negotiated `protocol_version` through a single property. The `get_server_capabilities()` method has been removed.
The high-level `Client.server_capabilities` property has similarly been replaced by `Client.server_params`.
194
+
The high-level `Client` exposes these directly as non-nullable properties (initialization is guaranteed inside the context manager): `client.server_capabilities`, `client.server_info`, and `client.server_instructions`.
0 commit comments