Type Alias StructuredToolCallInput<SchemaT, SchemaInputT>

StructuredToolCallInput<SchemaT, SchemaInputT>: (ToolInputSchemaOutputType<SchemaT> extends string
    ? string
    : never) | SchemaInputT | ToolCall

Defines the type that will be passed into a tool handler function as a result of a tool call.

Type Parameters

  • SchemaT extends ToolSchemaBase = ZodObjectAny

    The type of the tool input schema. Usually you don't need to specify this.

  • SchemaInputT = ToolInputSchemaInputType<SchemaT>

    The TypeScript type representing the structure of the tool arguments generated by the LLM. Useful for type checking tool handler functions when using JSONSchema.