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

Method tool_use

tests/test_open_telemetry.py:5466–5473  ·  view source on GitHub ↗
(index: int, name: str, **fields: object)

Source from the content-addressed store, hash-verified

5464 self, beta: bool, sync: bool, spans: Spans, respx_mock: MockRouter
5465 ) -> None:
5466 def tool_use(index: int, name: str, **fields: object) -> list[dict[str, Any]]:
5467 block: dict[str, Any] = {"type": "tool_use", "id": f"toolu_{index}", "name": name, "input": {}, **fields}
5468 delta = {"type": "input_json_delta", "partial_json": "{}"}
5469 return [
5470 {"type": "content_block_start", "index": index, "content_block": block},
5471 {"type": "content_block_delta", "index": index, "delta": delta},
5472 {"type": "content_block_stop", "index": index},
5473 ]
5474
5475 events = stream_events(index=3)
5476 events[1:1] = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected