FunctionCallingSchema

data class FunctionCallingSchema(val type: String = "function", val name: String, val title: String? = null, val description: String? = null, val strict: Boolean? = true, val parameters: ParametersDefinition)(source)

FunctionCallingSchema describes a function/tool call in LLM function calling APIs.

This follows the OpenAI function calling format where a tool is defined as:

  • type: Always "function"

  • name: The name of the function

  • description: What the function does

  • strict: Whether to enforce strict schema adherence

  • parameters: The function's parameter schema

Constructors

Link copied to clipboard
constructor(type: String = "function", name: String, title: String? = null, description: String? = null, strict: Boolean? = true, parameters: ParametersDefinition)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Optional title. Useful for MCP Tool definition

Link copied to clipboard

Functions

Link copied to clipboard

Encodes the given FunctionCallingSchema instance into a JsonObject representation.

Link copied to clipboard

Encodes the FunctionCallingSchema instance into its JSON string representation.