Parameter

data class Parameter(val name: String, val type: Parameter.Type, val description: String, val required: Boolean = true, val enum: List<String>? = null, val elementType: Parameter.Type? = null)

Represents a parameter for configuring tools or functions, including its name, type, description, and additional metadata such as whether it is required or accepts enumerated values.

Throws

If nested arrays are attempted by setting elementType to Type.ARRAY.

Constructors

Link copied to clipboard
constructor(name: String, type: Parameter.Type, description: String, required: Boolean = true, enum: List<String>? = null, elementType: Parameter.Type? = null)

Types

Link copied to clipboard

Properties

Link copied to clipboard

A description of the parameter's purpose and usage.

Link copied to clipboard

The data type of the elements if the parameter is an array. It is required when the type is Type.ARRAY. Defaults to null.

Link copied to clipboard

A list of allowable string values for the parameter, if applicable. Defaults to null.

Link copied to clipboard

The name of the parameter.

Link copied to clipboard

Indicates whether the parameter is mandatory. Defaults to true.

Link copied to clipboard

The data type of the parameter, defined by the Type enum.