onToolResult

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