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

Function narrate

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

Source from the content-addressed store, hash-verified

41
42 @mcp.tool()
43 async def narrate(ctx: Context) -> str:
44 await ctx.debug("d") # pyright: ignore[reportDeprecated]
45 await ctx.info("i") # pyright: ignore[reportDeprecated]
46 await ctx.warning("w") # pyright: ignore[reportDeprecated]
47 await ctx.error("e") # pyright: ignore[reportDeprecated]
48 return "done"
49
50 async def collect(params: LoggingMessageNotificationParams) -> None:
51 received.append(params)

Callers

nothing calls this directly

Calls 4

debugMethod · 0.80
infoMethod · 0.80
warningMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected