Package io.openliberty.mcp.tools
Class ToolCallException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.openliberty.mcp.tools.ToolCallException
- All Implemented Interfaces:
Serializable
Indicates a business logic error in a
Tool method.
If a method annotated with Tool throws an exception that is an instance of ToolCallException then it is
automatically converted to a failed ToolResponse. The message of the exception is used as the text of the result
content.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionToolCallException(String message) ToolCallException(String message, Throwable cause) ToolCallException(Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ToolCallException
-
ToolCallException
-
ToolCallException
-