File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -137,4 +137,9 @@ async def patched_create_streams():
137137 "mcp.shared.memory.create_client_server_memory_streams" , patched_create_streams
138138 ):
139139 # Return a collection with helper methods
140- yield lambda : StreamSpyCollection (client_spy , server_spy )
140+ def get_spy_collection () -> StreamSpyCollection :
141+ assert client_spy is not None , "client_spy was not initialized"
142+ assert server_spy is not None , "server_spy was not initialized"
143+ return StreamSpyCollection (client_spy , server_spy )
144+
145+ yield get_spy_collection
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def get_user_profile(user_id: str) -> str:
2525 # The handler returns a ServerResult with a ListResourceTemplatesResult inside
2626 result = await mcp ._mcp_server .request_handlers [types .ListResourceTemplatesRequest ](
2727 types .ListResourceTemplatesRequest (
28- method = "resources/templates/list" , params = None , cursor = None
28+ method = "resources/templates/list" , params = None
2929 )
3030 )
3131 assert isinstance (result .root , types .ListResourceTemplatesResult )
You can’t perform that action at this time.
0 commit comments