ChatFunctionToolFunctionFunction - TypeScript SDK

ChatFunctionToolFunctionFunction type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Function definition for tool calling

Example Usage

1import { ChatFunctionToolFunctionFunction } from "@openrouter/sdk/models";
2
3let value: ChatFunctionToolFunctionFunction = {
4 name: "get_weather",
5};

Fields

FieldTypeRequiredDescriptionExample
descriptionstringFunction description for the modelGet the current weather for a location
namestring✔️Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)get_weather
parametersRecord<string, *any*>Function parameters as JSON Schema object{"properties": {"location": {"description": "City name","type": "string"}
},
“required”: [
“location”
],
“type”: “object”
}
strictbooleanEnable strict schema adherencefalse