Order the steps of a tool-use loop
Claude Developer · Claude Architect · about 3 minutes
Your application gives Claude a weather tool. Arrange one full round of the tool-use loop in order.
- 1.Claude responds with stop_reason "tool_use" and a tool_use block naming the tool and its input
- 2.Your application runs the tool with that input
- 3.Send a user message containing a tool_result block with the matching tool_use_id
- 4.Claude responds with stop_reason "end_turn" and the final answer
- 5.Send a Messages API request with the user's question and the tool definitions