from fastmcp import FastMCP, Context
mcp = FastMCP(name="MyServer")
@mcp.tool()
async def analyze_data(data: str, ctx: Context) -> str:
"""Example tool that could use context for sampling."""
# (Tool implementation...)
return "done"
Context Object