Function: toolError()
Makaio Framework / tools-core / toolError
Function: toolError()
Section titled “Function: toolError()”toolError(
code,message,details?):ToolFailure
Defined in: ../../../tools/core/src/errors.ts:89
Creates a failed ToolResult from error parameters.
Parameters
Section titled “Parameters”string
Error code
message
Section titled “message”string
Error message
details?
Section titled “details?”unknown
Optional error details
Returns
Section titled “Returns”Failed ToolResult with error information
Example
Section titled “Example”if (!fileExists) { return toolError( ToolErrorCodes.RESOURCE_NOT_FOUND, `File not found: ${path}` );}