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

Function grow

tests/interaction/mcpserver/test_tools.py:414–418  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

412
413 @mcp.tool()
414 async def grow(ctx: Context) -> str:
415 mcp.add_tool(extra, name="extra")
416 mcp.remove_tool("doomed")
417 await ctx.info("tool set changed") # pyright: ignore[reportDeprecated]
418 return "mutated"
419
420 async def collect(message: IncomingMessage) -> None:
421 received.append(message)

Callers

nothing calls this directly

Calls 3

infoMethod · 0.80
add_toolMethod · 0.45
remove_toolMethod · 0.45

Tested by

no test coverage detected