onToolCall
infix fun <IncomingOutput, IntermediateOutput, OutgoingInput> AIAgentEdgeBuilderIntermediate<IncomingOutput, IntermediateOutput, OutgoingInput>.onToolCall(block: suspend (Message.Tool.Call) -> Boolean): AIAgentEdgeBuilderIntermediate<IncomingOutput, Message.Tool.Call, OutgoingInput>(source)
Creates an edge that filters tool call messages based on a custom condition.
Parameters
block
A function that evaluates whether to accept a tool call message
inline fun <IncomingOutput, IntermediateOutput, OutgoingInput, Args : Tool.Args> AIAgentEdgeBuilderIntermediate<IncomingOutput, IntermediateOutput, OutgoingInput>.onToolCall(tool: Tool<Args, *>, crossinline block: suspend (Args) -> Boolean): AIAgentEdgeBuilderIntermediate<IncomingOutput, Message.Tool.Call, OutgoingInput>(source)
Creates an edge that filters tool call messages for a specific tool and arguments condition.
Parameters
tool
The tool to match against
block
A function that evaluates the tool arguments to determine if the edge should accept the message
infix fun <IncomingOutput, IntermediateOutput, OutgoingInput> AIAgentEdgeBuilderIntermediate<IncomingOutput, IntermediateOutput, OutgoingInput>.onToolCall(tool: Tool<*, *>): AIAgentEdgeBuilderIntermediate<IncomingOutput, Message.Tool.Call, OutgoingInput>(source)
Creates an edge that filters tool call messages for a specific tool.
Parameters
tool
The tool to match against