Skip to content

Commit 3bcdc17

Browse files
authored
refactor: create the types subpackage, and the jsonrpc module (#1918)
1 parent ae7793e commit 3bcdc17

File tree

4 files changed

+503
-75
lines changed

4 files changed

+503
-75
lines changed

src/mcp/server/session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def handle_list_prompts(ctx: RequestContext) -> list[types.Prompt]:
4242
import anyio
4343
import anyio.lowlevel
4444
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
45-
from pydantic import AnyUrl
45+
from pydantic import AnyUrl, TypeAdapter
4646

4747
import mcp.types as types
4848
from mcp.server.experimental.session_features import ExperimentalServerSessionFeatures
@@ -105,11 +105,11 @@ def __init__(
105105
self._exit_stack.push_async_callback(lambda: self._incoming_message_stream_reader.aclose())
106106

107107
@property
108-
def _receive_request_adapter(self) -> types.TypeAdapter[types.ClientRequest]:
108+
def _receive_request_adapter(self) -> TypeAdapter[types.ClientRequest]:
109109
return types.client_request_adapter
110110

111111
@property
112-
def _receive_notification_adapter(self) -> types.TypeAdapter[types.ClientNotification]:
112+
def _receive_notification_adapter(self) -> TypeAdapter[types.ClientNotification]:
113113
return types.client_notification_adapter
114114

115115
@property

0 commit comments

Comments
 (0)