Interface DynamicStructuredToolInput<T>

Interface for the input parameters of the DynamicStructuredTool class.

interface DynamicStructuredToolInput<T> {
    description: string;
    func: ((input: TypeOf<T>, runManager?: CallbackManagerForToolRun, config?: RunnableConfig) => Promise<any>);
    name: string;
    schema: T;
    callbacks?: Callbacks;
    metadata?: Record<string, unknown>;
    responseFormat?: string;
    returnDirect?: boolean;
    tags?: string[];
    verbose?: boolean;
}

Type Parameters

  • T extends ZodAny = ZodAny

Hierarchy (view full)

Properties

description: string
func: ((input: TypeOf<T>, runManager?: CallbackManagerForToolRun, config?: RunnableConfig) => Promise<any>)
name: string
schema: T
callbacks?: Callbacks
metadata?: Record<string, unknown>
responseFormat?: string

The tool response format.

If "content" then the output of the tool is interpreted as the contents of a ToolMessage. If "content_and_artifact" then the output is expected to be a two-tuple corresponding to the (content, artifact) of a ToolMessage.

"content"
returnDirect?: boolean
tags?: string[]
verbose?: boolean