onToolValidationFailed
suspend fun onToolValidationFailed(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 validation error occurs during a tool call.
Parameters
eventId
The unique identifier for the event group.
executionInfo
The execution information for the tool call event;
runId
The unique identifier for the current run;
toolCallId
The unique identifier for the current tool call;
toolName
The name of the tool for which validation failed;
toolDescription
The description of the tool that was called;
toolArgs
The arguments that failed validation;
message
The validation error message;
error
The AIAgentError validation error;
context
The AI agent context associated with the tool call.