onToolCall

fun onToolCall(handler: suspend (eventContext: ToolCallContext) -> Unit)(source)

Append handler called when a tool is about to be called.


var onToolCall: suspend (tool: Tool<*, *>, toolArgs: ToolArgs) -> Unit(source)

Deprecated

Please use onToolCall() instead

Replace with

onToolCall(handler)

A deprecated variable for appending a handler called when a tool is about to be invoked.

Use the onToolCall function to properly append a handler for tool invocation events.