Interface IToolSchema


public interface IToolSchema
Interface for defining the schema of a tool
  • Method Details

    • setDescription

      void setDescription(String description)
      Set tool description
      Parameters:
      description - the description of the tool
    • addStringProperty

      void addStringProperty(String name)
      Add a string property to the tool schema
      Parameters:
      name - the name of the property
    • addStringProperty

      void addStringProperty(String name, String description)
      Add a string property to the tool schema with a description
      Parameters:
      name - the name of the property
      description - the description of the property
    • addIntegerProperty

      void addIntegerProperty(String name)
      Add an integer property to the tool schema
      Parameters:
      name - the name of the property
    • addIntegerProperty

      void addIntegerProperty(String name, String description)
      Add an integer property to the tool schema with a description
      Parameters:
      name - the name of the property
      description - the description of the property
    • addNumberProperty

      void addNumberProperty(String name)
      Add a number property to the tool schema
      Parameters:
      name - the name of the property
    • addNumberProperty

      void addNumberProperty(String name, String description)
      Add a number property to the tool schema with a description
      Parameters:
      name - the name of the property
      description - the description of the property
    • addBooleanProperty

      void addBooleanProperty(String name)
      Add a boolean property to the tool schema
      Parameters:
      name - the name of the property
    • addBooleanProperty

      void addBooleanProperty(String name, String description)
      Add a boolean property to the tool schema with a description
      Parameters:
      name - the name of the property
      description - the description of the property
    • addEnumProperty

      void addEnumProperty(String name, List<String> enumValues)
      Add an enum property to the tool schema
      Parameters:
      name - the name of the property
      enumValues - the list of possible values for the enum
    • addEnumProperty

      void addEnumProperty(String name, List<String> enumValues, String description)
      Add an enum property to the tool schema with a description
      Parameters:
      name - the name of the property
      enumValues - the list of possible values for the enum
      description - the description of the property
    • required

      void required(List<String> required)
      Specify required properties for the tool schema
      Parameters:
      required - the list of required property names
    • required

      void required(String... required)
      Specify required properties for the tool schema
      Parameters:
      required - the array of required property names
    • additionalProperties

      void additionalProperties(Boolean additionalProperties)
      Allow additional properties in the tool schema
      Parameters:
      additionalProperties - true to allow additional properties, false otherwise