Skip to content
1 min read · 156 words

Type Alias: OpenAIResponsesTool ​

ts
type OpenAIResponsesTool = {
  description?: string | null;
  name: string;
  parameters: JsonSchema | null;
  strict?: boolean | null;
  type: "function";
};

Defined in: src/batteries/llm/openai_responses/types.ts:243

Wire shape of a single function tool advertised to the model. name is TOP-LEVEL, unlike Chat Completions' {type:'function', function:{name, ...}} nesting.

Properties ​

PropertyTypeDescriptionDefined in
description?string | nullHuman-readable description of what the tool does, shown to the model.src/batteries/llm/openai_responses/types.ts:249
namestringThe tool's name, as the model will reference it in a function_call item.src/batteries/llm/openai_responses/types.ts:247
parametersJsonSchema | nullJSON Schema describing the tool's accepted arguments.src/batteries/llm/openai_responses/types.ts:251
strict?boolean | nullWhether the provider should enforce strict schema adherence for this tool's arguments.src/batteries/llm/openai_responses/types.ts:253
type"function"Tool-kind discriminator; always 'function' for this battery's v1.src/batteries/llm/openai_responses/types.ts:245