MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / _tool_reference_block

Function _tool_reference_block

tests/lib/tools/test_runners.py:816–820  ·  view source on GitHub ↗
(kind: Literal["tool_removal", "tool_addition"], name: str)

Source from the content-addressed store, hash-verified

814
815
816def _tool_reference_block(kind: Literal["tool_removal", "tool_addition"], name: str) -> BetaContentBlockParam:
817 tool: BetaToolChangeToolReferenceParam = {"type": "tool_reference", "name": name}
818 if kind == "tool_removal":
819 return {"type": "tool_removal", "tool": tool}
820 return {"type": "tool_addition", "tool": tool}
821
822
823def _run_sync_tool_use(

Calls

no outgoing calls

Tested by

no test coverage detected