MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / crunch

Function crunch

tests/interaction/mcpserver/test_context.py:80–83  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

78
79 @mcp.tool()
80 async def crunch(ctx: Context) -> str:
81 await ctx.report_progress(1, 3)
82 await ctx.report_progress(2, 3, "halfway there")
83 return "crunched"
84
85 async def on_progress(progress: float, total: float | None, message: str | None) -> None:
86 received.append((progress, total, message))

Callers

nothing calls this directly

Calls 1

report_progressMethod · 0.45

Tested by

no test coverage detected