onToolCall

suspend fun onToolCall(runId: String, toolCallId: String?, tool: Tool<*, *>, toolArgs: ToolArgs)(source)

Notifies all registered tool handlers when a tool is called.

Parameters

runId

The unique identifier for the current run.

tool

The tool that is being called

toolArgs

The arguments provided to the tool