ToolSpec

data class ToolSpec(val name: String, val description: String, val inputSchema: JsonObject)

What a model is told about a tool.

Throws

if name has other characters or the wrong length.

Constructors

Link copied to clipboard
constructor(name: String, description: String, inputSchema: JsonObject)

Properties

Link copied to clipboard

tells the model what the tool does and when to use it. The model chooses its tools from this text, so say what the tool returns and when it applies.

Link copied to clipboard
val inputSchema: JsonObject

a JSON Schema object that describes the tool's input.

Link copied to clipboard

how the model refers to the tool: 1 to 64 letters, digits, _ or -.