The application sends messages plus tool definitions containing names, descriptions, and argument schemas. The model returns a structured request with a tool name, arguments, and a call ID.
The runtime validates the schema, authenticates the user, checks policy, and executes the function. It records the outcome and sends a tool-result message linked to the same call ID. The model then uses that result to answer or request another tool.
If execution fails, return a safe, useful error instead of pretending the tool succeeded. Side-effectful tools should accept an idempotency key. Log the proposal, policy decision, execution, and response as separate events.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓