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

Function _tool_reference_block

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

Source from the content-addressed store, hash-verified

1007
1008
1009def _tool_reference_block(
1010 kind: Literal["tool_removal", "tool_addition"], name: str
1011) -> BetaRequestToolRemovalBlockParam | BetaRequestToolAdditionBlockParam:
1012 tool: BetaToolChangeToolReferenceParam = {"type": "tool_reference", "name": name}
1013 if kind == "tool_removal":
1014 return {"type": "tool_removal", "tool": tool}
1015 return {"type": "tool_addition", "tool": tool}
1016
1017
1018def _run_sync_tool_use(

Calls

no outgoing calls

Tested by

no test coverage detected