fix: correct Context type parameters across examples and tests (#2256)
This commit is contained in:
parent
51c53f2c18
commit
31a38b5078
1 changed files with 59 additions and 75 deletions
|
|
@ -1,11 +1,10 @@
|
|||
from mcp.server.mcpserver import Context, MCPServer
|
||||
from mcp.server.session import ServerSession
|
||||
|
||||
mcp = MCPServer(name="Notifications Example")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def process_data(data: str, ctx: Context[ServerSession, None]) -> str:
|
||||
async def process_data(data: str, ctx: Context) -> str:
|
||||
"""Process data with logging."""
|
||||
# Different log levels
|
||||
await ctx.debug(f"Debug: Processing '{data}'")
|
||||
|
|
|
|||
Loading…
Reference in a new issue