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

Function _tool_reference_block

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

Source from the content-addressed store, hash-verified

1014
1015
1016def _tool_reference_block(kind: Literal["tool_removal", "tool_addition"], name: str) -> BetaContentBlockParam:
1017 tool: BetaToolChangeToolReferenceParam = {"type": "tool_reference", "name": name}
1018 if kind == "tool_removal":
1019 return {"type": "tool_removal", "tool": tool}
1020 return {"type": "tool_addition", "tool": tool}
1021
1022
1023def _run_sync_tool_use(

Calls

no outgoing calls

Tested by

no test coverage detected