ToolDescriptor

open class ToolDescriptor(val name: String, val description: String, val requiredParameters: List<ToolParameterDescriptor> = emptyList(), val optionalParameters: List<ToolParameterDescriptor> = emptyList())(source)

Represents a descriptor for a tool that contains information about the tool's name, description, required parameters, and optional parameters.

This class is annotated with @Serializable to support serialization/deserialization using kotlinx.serialization.

Constructors

Link copied to clipboard
constructor(name: String, description: String, requiredParameters: List<ToolParameterDescriptor> = emptyList(), optionalParameters: List<ToolParameterDescriptor> = emptyList())

Properties

Link copied to clipboard

The description of the tool.

Link copied to clipboard

The name of the tool.

Link copied to clipboard

A list of ToolParameterDescriptor representing the optional parameters for the tool.

Link copied to clipboard

A list of ToolParameterDescriptor representing the required parameters for the tool.

Functions

Link copied to clipboard
fun copy(name: String = this.name, description: String = this.description, requiredParameters: List<ToolParameterDescriptor> = this.requiredParameters.toList(), optionalParameters: List<ToolParameterDescriptor> = this.optionalParameters.toList()): ToolDescriptor

Creates a copy of the current ToolDescriptor with the option to modify specific attributes.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String