Type alias GMIToolCallGate

GMIToolCallGate: ((call, context?) => Promise<GMIToolCallRefusal | null>)

Asked before the GMI runs a call of its own tool round. Resolving to null lets the call run. A refusal turns the call into a refused tool result that the model reads (an error with the code AUTH_PERMISSION_DENIED, as a permission refusal is recorded), and the tool is not called; a gate that throws refuses the call too. The GMI asks about every call of a step, with the step's calls and the turn's retrieved sources in context, before any call of the step runs. AgentOS builds one from its output guardrails that set config.evaluateToolCalls: it judges each call alone, then the calls of the step that pass alone together, as the stream's TOOL_CALL_REQUEST chunk for the step holds them, each time with the turn's sources; a block on the calls together refuses each of them.

Type declaration