isRetryable

abstract fun isRetryable(context: ToolContext, tool: BaseTool, args: Map<String, Any?>, error: Any): Boolean

Returns false if retrying cannot fix error, such as a permanent client error.

error is the exception the tool threw or the error found in its result.