Package io.openliberty.mcp.tools
Record Class ToolManager.ToolAnnotations
java.lang.Object
java.lang.Record
io.openliberty.mcp.tools.ToolManager.ToolAnnotations
- Enclosing interface:
- ToolManager
public static record ToolManager.ToolAnnotations(String title, boolean readOnlyHint, boolean destructiveHint, boolean idempotentHint, boolean openWorldHint)
extends Record
The MCP annotations of a tool.
-
Constructor Summary
ConstructorsConstructorDescriptionToolAnnotations(String title, boolean readOnlyHint, boolean destructiveHint, boolean idempotentHint, boolean openWorldHint) Creates an instance of aToolAnnotationsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedestructiveHintrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theidempotentHintrecord component.booleanReturns the value of theopenWorldHintrecord component.booleanReturns the value of thereadOnlyHintrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToolAnnotations
public ToolAnnotations(String title, boolean readOnlyHint, boolean destructiveHint, boolean idempotentHint, boolean openWorldHint) Creates an instance of aToolAnnotationsrecord class.- Parameters:
title- the value for thetitlerecord componentreadOnlyHint- the value for thereadOnlyHintrecord componentdestructiveHint- the value for thedestructiveHintrecord componentidempotentHint- the value for theidempotentHintrecord componentopenWorldHint- the value for theopenWorldHintrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
readOnlyHint
public boolean readOnlyHint()Returns the value of thereadOnlyHintrecord component.- Returns:
- the value of the
readOnlyHintrecord component
-
destructiveHint
public boolean destructiveHint()Returns the value of thedestructiveHintrecord component.- Returns:
- the value of the
destructiveHintrecord component
-
idempotentHint
public boolean idempotentHint()Returns the value of theidempotentHintrecord component.- Returns:
- the value of the
idempotentHintrecord component
-
openWorldHint
public boolean openWorldHint()Returns the value of theopenWorldHintrecord component.- Returns:
- the value of the
openWorldHintrecord component
-