Open main menu
Article
Quizzes
Tools
EN
Article
Quizzes
Tools
All quizzes
/
AI APIs & SDKs
/
How does t...
How does the API signal that the model wants to call a tool?
The response has stop_reason set to "tool_use" and includes a tool_use content block containing the tool name and input
The response body contains a tool_call field with the function name
The model writes the tool call as JSON inside a code block in its text response
The API returns HTTP 202 Accepted to indicate a pending tool invocation
Submit answers