onToolValidationError
fun onToolValidationError(handler: suspend (eventContext: ToolValidationErrorContext) -> Unit)(source)
Append handler called when a validation error occurs during a tool call.
var onToolValidationError: suspend (tool: Tool<*, *>, toolArgs: ToolArgs, value: String) -> Unit(source)
Deprecated
Please use onToolValidationError() instead
Replace with
onToolValidationError(handler)
Content copied to clipboard
A deprecated variable representing the handler invoked when a validation error occurs during a tool call. Use onToolValidationError(handler)
instead to register error handling logic.
The handler receives the following parameters:
tool
: The tool instance where the validation error occurred.toolArgs
: The arguments provided to the tool during the call.value
: The string representing the invalid value or other contextual information about the error.
This property is deprecated and maintained for backward compatibility.