ToolSchema

data class ToolSchema(val schema: String? = null, val properties: JsonObject? = null, val required: List<String>? = null, val defs: JsonObject? = null)(source)

A JSON Schema for tool input or output parameters.

This is a simplified schema structure that must be of type "object". Defaults to the JSON Schema 2020-12 dialect when no explicit schema ($schema) is provided.

Constructors

Link copied to clipboard
constructor(schema: String? = null, properties: JsonObject? = null, required: List<String>? = null, defs: JsonObject? = null)

Properties

Link copied to clipboard
@SerialName(value = "$defs")
val defs: JsonObject?

Optional schema definitions available to references in properties. Serialized as $defs.

Link copied to clipboard

Optional map of property names to their schema definitions.

Link copied to clipboard

Optional list of property names that are required.

Link copied to clipboard
@SerialName(value = "$schema")
val schema: String?

Optional URI identifying the JSON Schema dialect (e.g., https://json-schema.org/draft/2020-12/schema). Serialized as $schema. When absent, JSON Schema 2020-12 is assumed by default.

Link copied to clipboard

Always "object" for tool schemas.