ToolFunction
Types for defining tools, functions, and their execution configurations.Overview
Tool types define how LLMs can call external functions, including schemas, parameters, HTTP configurations, and retry logic.ToolFunction
Tool function definition with schema and optional HTTP request configuration.Fields
Must be
"function".The function definition containing the schema. See ToolFunctionDefinition.
Optional HTTP request configuration for executing the function via REST API. See FunctionRequestHttp.
Example
ToolFunctionDefinition
See the dedicated ToolFunctionDefinition page for full documentation. Wrapper for a function schema within a tool definition.Fields
The function schema. Aliased as
schema in JSON — use var_schema in Python to avoid collision with the Python reserved word.Example
FunctionSchema
See the dedicated FunctionSchema page for full documentation. Function/tool schema definition for LLM function calling.Fields
Function name. Must match
^[a-zA-Z0-9_]{1,64}$ (alphanumeric and underscores, max 64 chars).Description of what the function does. Max 4096 characters.
JSON Schema object describing the function parameters.
Whether to enforce strict schema validation. When
True, the LLM must conform exactly to the parameter schema.Example
FunctionRequestHttp
HTTP request configuration for executing functions via REST API.Fields
Must be
"http".HTTP method. One of:
"get", "post".The request URL. Supports
{{variable}} template syntax.Optional HTTP headers.
Optional query parameters.
Optional request body.
Optional proxy URL.
Optional proxy headers.
Optional retry configuration. See FunctionRequestRetry.
Example
FunctionRequestRetry
Retry configuration with exponential backoff.Fields
Maximum number of retry attempts. Minimum: 1.
Initial delay in milliseconds. Minimum: 1.
Multiplier for each subsequent retry. Minimum: 1.