MockToolFn: ((...args) => any)

A mock tool function. Can be sync or async. Receives the parsed tool arguments and tool options (matching the regular execute signature), but the mock is free to ignore them. Whatever the function returns becomes the tool output. Throwing produces a tool error event, just like a real tool execute.

Type declaration

    • (...args): any
    • Parameters

      • Rest ...args: any[]

      Returns any