Tool selection, execution and observation 00:00:01 A refund written in pencil A model writes “refund order forty-two, twenty-four dollars” on a slip and pushes it under the payment window. The slip uses the correct fields. Sam has still transferred zero dollars. What has to happen on the other side? Tool use crosses a boundary from generated proposals to effects controlled by the host. Selection, argument validation, authorization, execution and recording are distinct operations. A result is an observation only after the tool has actually returned it. Validate the arguments, verify the caller and the allowed amount, then check whether this exact operation already has a committed result. Keep the same operation identity when an ambiguous network response causes a retry. 00:00:51 From proposal to permission The proposal identifies a tool and arguments. It has not issued a refund, even if the Jay son is syntactically perfect. The gateway checks ownership, amount limits and required approval. Keep this decision outside the model. Return a typed approval-required result. The next model response can ask for review without claiming the refund already happened. 00:01:17 Know whether a write committed In function calling the model proposes a tool name and structured arguments. The application validates them, checks authorization, executes a permitted operation and returns the result. A generated call has no effect by itself. Persist the result of a write before retrying an interrupted conversation. Return a refund proposal for a read-only fixture. The expected ledger balance stays unchanged even if all argument types validate. A tool is an externally implemented operation exposed through a contract. Define its input, output, failure cases and side effects. A model can request “find order 42,” while the tool gateway independently checks whose order it is and returns a structured observation. A tool returns no matching order. Classify that as a successful empty lookup rather than a timeout or an authorization failure. Trace each tool call with a run ID, tool version, duration, outcome and safe result summary. Distinguish validation rejection, access denial, timeout and successful empty results. These outcomes should produce different next decisions. Redact sensitive arguments before they enter telemetry. A tool contributes 200 milliseconds of service time after 800 milliseconds in a queue. Separate these spans before tuning the underlying lookup. For writes, design the retry and review behavior before optimizing the prompt. A duplicate refund is a correctness error even when both requests select the right tool and contain individually valid arguments. 00:03:01 The same request knocks twice A repeat request carries an existing successful operation key. What is the appropriate effect? Checking a scoped idempotency record prevents duplicated effects when a request is retried after an ambiguous response. A tool proposal is a request. The host enforces the business rule, and the ledger proves the effect. Returning an existing authorized result can complete a retry without another payment.