Asked about Failures, parallel calls and keeping results small
A tool throws an exception. What should happen?
An answer that works
In most cases return the error to the model as the tool result, so it can recover, retry with different arguments or explain the problem. Terminal failures such as authentication errors should stop the run instead, because retrying cannot help.
Reading an answer is not being able to give one. The section that teaches this is Failures, parallel calls and keeping results small, 4 hours of Tool calling.
Learn this properlyAlso asked about Tool calling
Walk me through what happens when a model calls a tool.What makes a good tool description?How many API calls does one tool-using question take?Why use an enum in a parameter schema?How do you handle a model requesting several tools in one turn?Why does the size of a tool result matter?How do you stop an agent taking a destructive action?