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

Function hold

tests/interaction/transports/test_hosting_resume.py:295–301  ·  view source on GitHub ↗

Signal start, wait for the test, signal completion.

(ctx: Context)

Source from the content-addressed store, hash-verified

293
294 @mcp.tool()
295 async def hold(ctx: Context) -> str:
296 """Signal start, wait for the test, signal completion."""
297 started.set()
298 await release.wait()
299 await ctx.info("released") # pyright: ignore[reportDeprecated]
300 finished.set()
301 return "held"
302
303 async with mounted_app(mcp, event_store=SequencedEventStore(), retry_interval=0) as (http, _):
304 session_id = await initialize_via_http(http)

Callers

nothing calls this directly

Calls 2

waitMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected