Tool call

Last verified

A tool call is the model asking to run a function, followed by your code returning a result that re-enters the conversation.

Each call is a round trip that resends the accumulated context, so a multi-tool sequence costs more than its individual steps suggest. Unbounded tool output is a common cause of runaway cost — a tool returning a whole file has permanently enlarged every subsequent request.

Truncate or summarise tool results before they enter context.