Asked about Failures, parallel calls and keeping results small
Why does the size of a tool result matter?
An answer that works
It enters the context and is resent on every subsequent turn, so a large result raises the cost of the whole remaining conversation. Return only what is needed and cap anything unbounded.
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?A tool throws an exception. What should happen?How do you handle a model requesting several tools in one turn?How do you stop an agent taking a destructive action?