Skip to main content
The model returns tool_use blocks and stop_reason: "tool_use". Your code runs the tools and answers in a user message with one tool_result block per call.
Send the assistant content back as it came, including any thinking blocks. NagaAI ignores is_error on tool_result, so describe a failure in the result text. tool_choice takes {"type": "auto"}, {"type": "any"}, {"type": "tool", "name": "..."} or {"type": "none"}. See Tool calling for the rules shared by all formats.