ResultErrorExtractor

Finds an error that a tool reported in its result instead of throwing.

Functions

Link copied to clipboard
abstract fun extractErrorFromResult(context: ToolContext, tool: BaseTool, args: Map<String, Any?>, result: Map<String, Any?>): Any?

Returns the error in result, such as result itself when it holds "status": "error", or null if the call succeeded.