S
Sonny
Text
Handling Tool-Use Blocks and Returning Tool Results — Building with the Claude API
Detect a tool_use content block in the response, execute the matching function, and send the tool_result back in the next user turn with the matching id so the model can continue. Taught in the cours…