Function calling and tool results
Caller responsibility
A returned function call is a request for your application to execute a tool. In the official function-calling guide, checked November 14, 2026, the application supplies the tool result with the matching call_id. The model does not execute your local function by naming it.
Suppose a fictional dispatch assistant requests two shipment lookups. The second finishes first. Associate each result with its own call ID, not its arrival position, or one customer’s status can answer another customer’s question. Validate the arguments before either lookup runs.
Execution gates
Keep an allowlist of callable tools and reject an invented name. A read tool and a dispatch-changing tool need different permissions. Approval for one payload does not authorize changed arguments; compare the exact request before a write.
The notebook uses local original functions and prepared calls. It has no provider connection or real dispatch service. Continue with tool schemas, allowed dispatch and exact approval.