Record Class ToolDefinitionMethods

java.lang.Object
java.lang.Record
io.meeds.mcp.server.model.ToolDefinitionMethods
Record Components:
tools - the tool definitions
icon - the file's default Font Awesome icon name, or null

public record ToolDefinitionMethods(List<SimpleToolDefinition> tools, String icon) extends Record
The content of an ai-tool-definitions.json file: its tools and the Font Awesome icon name its tools use when they declare none. Unknown properties are ignored, so a field added by a newer add-on never drops the whole file on an older server.
  • Constructor Details

    • ToolDefinitionMethods

      public ToolDefinitionMethods(List<SimpleToolDefinition> tools)
      Parameters:
      tools - the tool definitions, with no file default icon
    • ToolDefinitionMethods

      public ToolDefinitionMethods(List<SimpleToolDefinition> tools, String icon)
      Creates an instance of a ToolDefinitionMethods record class.
      Parameters:
      tools - the value for the tools record component
      icon - the value for the icon record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • tools

      public List<SimpleToolDefinition> tools()
      Returns the value of the tools record component.
      Returns:
      the value of the tools record component
    • icon

      public String icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component