kernl

Type Alias: LanguageModelFunctionTool

type LanguageModelFunctionTool = {
  description?: string;
  kind: "function";
  name: string;
  parameters: JSONSchema7;
  providerOptions?: SharedProviderOptions;
};

Defined in: packages/protocol/src/language-model/tool.ts:10

A tool has a name, a description, and a set of parameters.

Note: this is not the user-facing tool definition. The AI SDK methods will map the user-facing tool definitions to this format.

Properties

description?

optional description: string;

Defined in: packages/protocol/src/language-model/tool.ts:22

A description of the tool. The language model uses this to understand the tool's purpose and to provide better completion suggestions.


kind

readonly kind: "function";

Defined in: packages/protocol/src/language-model/tool.ts:11


name

name: string;

Defined in: packages/protocol/src/language-model/tool.ts:16

The name of the tool. Unique within this model call.


parameters

parameters: JSONSchema7;

Defined in: packages/protocol/src/language-model/tool.ts:28

The parameters that the tool expects. The language model uses this to understand the tool's input requirements and to provide matching suggestions.


providerOptions?

optional providerOptions: SharedProviderOptions;

Defined in: packages/protocol/src/language-model/tool.ts:33

The provider-specific options for the tool.

On this page