onToolCallFailed
suspend fun onToolCallFailed(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JsonObject, message: String, error: AIAgentError?, context: AIAgentContext)(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
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 AIAgentError that caused the failure;
context
The AI agent context associated with the tool call.