onToolCallFailed
expect open suspend override fun onToolCallFailed(eventId: String, executionInfo: AgentExecutionInfo, context: AIAgentContext, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JSONObject, message: String, error: Throwable?)(source)
Notifies all registered tool handlers when a tool call fails with an exception.
Parameters
eventId
The unique identifier for the event group;
executionInfo
The execution information for the tool call agent event;
context
The context of the strategy execution;
runId
The unique identifier for the current run;
toolCallId
The unique identifier for the current tool call;
toolName
The tool name that was called;
toolDescription
The description of the tool that was called;
toolArgs
The arguments provided to the tool;
message
A message describing the failure;
error
The exception that caused the failure, or null if no exception is available.