File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -521,11 +521,11 @@ async def test_context_logging(self):
521521 """Test that context logging methods work."""
522522 mcp = FastMCP ()
523523
524- def logging_tool (msg : str , ctx : Context ) -> str :
525- ctx .debug ("Debug message" )
526- ctx .info ("Info message" )
527- ctx .warning ("Warning message" )
528- ctx .error ("Error message" )
524+ async def logging_tool (msg : str , ctx : Context ) -> str :
525+ await ctx .debug ("Debug message" )
526+ await ctx .info ("Info message" )
527+ await ctx .warning ("Warning message" )
528+ await ctx .error ("Error message" )
529529 return f"Logged messages for { msg } "
530530
531531 mcp .add_tool (logging_tool )
@@ -563,8 +563,8 @@ def test_resource() -> str:
563563
564564 @mcp .tool ()
565565 async def tool_with_resource (ctx : Context ) -> str :
566- data = await ctx .read_resource ("test://data" )
567- return f"Read resource: { data } "
566+ data , mime_type = await ctx .read_resource ("test://data" )
567+ return f"Read resource: { data } with mime type { mime_type } "
568568
569569 async with client_session (mcp ._mcp_server ) as client :
570570 result = await client .call_tool ("tool_with_resource" , {})
You can’t perform that action at this time.
0 commit comments