Package com.tnsai.mcp.server.event
Enum Class ToolErrorCategory
- All Implemented Interfaces:
Serializable,Comparable<ToolErrorCategory>,Constable
Categories of tool execution errors.
Helps clients decide on the appropriate recovery strategy:
INVALID_PARAMS— request malformed, do not retry with same paramsTOOL_NOT_FOUND— tool does not exist, check tool registryTIMEOUT— execution timed out, may retryPERMISSION_DENIED— access denied, do not retryINTERNAL— unexpected error, may retry
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the machine-readable error code.booleanReturns whether this error category is typically retriable.static ToolErrorCategoryReturns the enum constant of this class with the specified name.static ToolErrorCategory[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
INVALID_PARAMS
-
TOOL_NOT_FOUND
-
TIMEOUT
-
PERMISSION_DENIED
-
INTERNAL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
code
Returns the machine-readable error code. -
isRetriable
public boolean isRetriable()Returns whether this error category is typically retriable.
-