message = { "content": [ {"type": "text", "text": "Ready"}, {"type": "tool_use", "name": "lookup", "input": {}}, ]}texts = [b["text"] for b in message["content"] if b["type"] == "text"]calls = [b for b in message["content"] if b["type"] == "tool_use"]print("".join(texts), len(calls))