onToolResult
inline fun <IncomingOutput, IntermediateOutput, OutgoingInput, Result : ToolResult> AIAgentEdgeBuilderIntermediate<IncomingOutput, IntermediateOutput, OutgoingInput>.onToolResult(tool: Tool<*, Result>, crossinline block: suspend (SafeTool.Result<Result>) -> Boolean): AIAgentEdgeBuilderIntermediate<IncomingOutput, ReceivedToolResult, OutgoingInput>(source)
Creates an edge that filters tool result messages for a specific tool and result condition.
Parameters
tool
The tool to match against
block
A function that evaluates the tool result to determine if the edge should accept the message