Interface DynamicToolInput<ToolOutputT>

Interface for the input parameters of the DynamicTool class.

interface DynamicToolInput<ToolOutputT> {
    callbacks?: Callbacks;
    description: string;
    func: ((input: string, runManager?: CallbackManagerForToolRun, config?: ToolRunnableConfig<Record<string, any>>) => Promise<ToolOutputT>);
    metadata?: Record<string, unknown>;
    name: string;
    responseFormat?: string;
    returnDirect?: boolean;
    tags?: string[];
    verbose?: boolean;
    verboseParsingErrors?: boolean;
}

Type Parameters

  • ToolOutputT = ToolOutputType

Hierarchy (view full)

Properties

callbacks?: Callbacks
description: string
func: ((input: string, runManager?: CallbackManagerForToolRun, config?: ToolRunnableConfig<Record<string, any>>) => Promise<ToolOutputT>)
metadata?: Record<string, unknown>
name: string
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

Whether to return the tool's output directly.

Setting this to true means that after the tool is called, an agent should stop looping.

tags?: string[]
verbose?: boolean
verboseParsingErrors?: boolean

Whether to show full details in the thrown parsing errors.

false