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

Function _tool_use

tests/lib/tools/toolsets/test_runner.py:37–41  ·  view source on GitHub ↗
(name: str, id: str, input: dict[str, Any], *, toolset_name: str | None = None)

Source from the content-addressed store, hash-verified

35
36
37def _tool_use(name: str, id: str, input: dict[str, Any], *, toolset_name: str | None = None) -> dict[str, Any]:
38 block: dict[str, Any] = {"type": "tool_use", "id": id, "name": name, "input": input}
39 if toolset_name is not None:
40 block["toolset_name"] = toolset_name
41 return block
42
43
44def _response(*blocks: dict[str, Any]) -> httpx2.Response:

Calls

no outgoing calls

Tested by

no test coverage detected