ReadonlyannotationsThe advisory labels the tool was registered with — {readOnly?, destructive?, idempotent?} — or null where it carries none or is no longer registered. Never enforced; this is what an onToolCall policy reads.
ReadonlyargumentsThe arguments the model wrote, as an object. A copy: mutating it changes nothing.
ReadonlyidThe provider's id for this call, which a tool result answers and resume names.
ReadonlynameThe tool's name, as registered.
One tool call the model requested: handed to
onToolCallandonToolResult, listed onAiIterationState.toolCalls, and returned asAiCallResult.deferredfor the calls a hook deferred.argumentsis a copy; to run the call with different arguments, return{action: "run", arguments}fromonToolCall.annotationsis what the tool's author said the tool does, for a hook to hold a policy over.Example: ```javascript const asked = []; const result = B.ai.call({ message: B.net.request.parameter("q"), tools: [archiveNote], onToolCall: (call) => { asked.push(call.name + " " + JSON.stringify(call.arguments)); return call.annotations && call.annotations.destructive ? { action: "deny", reason: "destructive tools need a human" } : null; }, }); ```