mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2026-01-25 00:34:21 +01:00
Return a specific server session instance of request context
We currently return a generic instance of RequestContext without a specialization on the Session type. This makes it impossible for servers to typesafe call `list_roots()` and other methods. We now return a specific instance of `RequestContext[ServerSession]`
This commit is contained in:
@@ -84,7 +84,7 @@ async def sse_client(
|
||||
|
||||
case "message":
|
||||
try:
|
||||
message = types.JSONRPCMessage.model_validate_json( # noqa: E501
|
||||
message = types.JSONRPCMessage.model_validate_json( # noqa: E501
|
||||
sse.data
|
||||
)
|
||||
logger.debug(
|
||||
|
||||
Reference in New Issue
Block a user