pub type FunctionDeclaration = ToolDefinition;Expand description
A tool definition describing a callable function.
This is a type alias for ToolDefinition from core types, maintaining
backward compatibility with existing code that uses FunctionDeclaration.
Aliased Type§
pub struct FunctionDeclaration {
pub name: String,
pub description: String,
pub parameters: Option<Value>,
pub defer_loading: bool,
}Fields§
§name: StringName of the function
description: StringDescription of what the function does
parameters: Option<Value>JSON Schema describing the function parameters
defer_loading: boolKeep this tool’s schema out of the model’s context until the model looks it up.
A provider with on-demand tool loading (Anthropic’s tool search) still sends the definition, but loads it into context only when the model searches for it, so a wide catalogue stops costing its full width on every request. Every other provider ignores it and sends the tool as usual, so the same request falls back across providers unchanged.