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

Function tool_use_message

tests/lib/tools/test_open_telemetry.py:74–84  ·  view source on GitHub ↗
(city: str = "SF")

Source from the content-addressed store, hash-verified

72
73
74def tool_use_message(city: str = "SF") -> dict[str, Any]:
75 return {
76 "id": f"msg_{city}",
77 "type": "message",
78 "role": "assistant",
79 "model": "claude-test",
80 "content": [{"type": "tool_use", "id": f"toolu_{city}", "name": "get_weather", "input": {"city": city}}],
81 "stop_reason": "tool_use",
82 "stop_sequence": None,
83 "usage": USAGE,
84 }
85
86
87def sse(message: dict[str, Any]) -> httpx2.Response:

Calls

no outgoing calls

Tested by

no test coverage detected