Deprecate roots, sampling, and logging methods per SEP-2577 (#2926)

This commit is contained in:
Marcelo Trylesinski 2026-06-20 17:25:41 +01:00 • committed by GitHub
commit 4573e4ac33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1110,10 +1110,10 @@ class TestContextInjection:
mcp = MCPServer()
async def logging_tool(msg: str, ctx: Context) -> str:
await ctx.debug("Debug message")
await ctx.info("Info message")
await ctx.warning("Warning message")
await ctx.error("Error message")
await ctx.debug("Debug message") # pyright: ignore[reportDeprecated]
await ctx.info("Info message") # pyright: ignore[reportDeprecated]
await ctx.warning("Warning message") # pyright: ignore[reportDeprecated]
await ctx.error("Error message") # pyright: ignore[reportDeprecated]
return f"Logged messages for {msg}"
mcp.add_tool(logging_tool)