FunctionSchema
Defines the JSON Schema for a tool or function that an LLM can invoke via function calling.Import
Definition
Fields
| Field | Type | Description |
|---|---|---|
name | string | Function name. Must match ^[a-zA-Z0-9_]{1,64}$ — alphanumeric and underscores only, 1–64 characters. |
description | string | Human-readable description of what the function does. Maximum 4096 characters. The LLM uses this to decide when to call the function. |
parameters | any | A JSON Schema object describing the function’s input parameters. Typically an object schema with properties and required. |
strict | boolean | null | When true, the LLM must produce arguments that strictly conform to the parameters schema. When false or null, the LLM may produce approximate matches. |
Usage
Basic function schema
Complete tool definition
FunctionSchema is used inside a ToolFunction definition:
JSON representation
See Also
- ToolFunction — wraps
FunctionSchemainside a tool definition