docs: add snippet verification for docs/ pages (#2115)

This commit is contained in:
Felix Weinberger 2026-02-23 15:38:15 +00:00 • committed by GitHub
commit 1ef124e4a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,13 @@
import mcp.types as types
from mcp.server.lowlevel import Server
server = Server("Logging Level Example")
current_level: types.LoggingLevel = "warning"
@server.set_logging_level()
async def handle_set_level(level: types.LoggingLevel) -> None:
"""Handle client request to change the logging level."""
global current_level
current_level = level