Skip to content

Overview / Tool

Tool

Extends

  • DynamicStructuredTool<typeof toolSchema>

Constructors

new Tool()

new Tool(name, description, fn, options?): Tool

Parameters

ParameterType
namestring
descriptionstring
fnToolFun
options?ToolOptions

Returns

Tool

Overrides

DynamicStructuredTool<typeof toolSchema>.constructor

Properties

PropertyType
startExamplesstring[]

Accessors

active

get active(): boolean

set active(active): void

Parameters

ParameterType
activeboolean

Returns

boolean

Methods

assignCat()

assignCat(cat): Tool

Parameters

ParameterType
catStrayCat

Returns

Tool


invoke()

invoke(input, config?): Promise<string>

Invokes the tool with the provided input and configuration.

Parameters

ParameterTypeDescription
inputstring | objectThe input for the tool.
config?RunnableConfig<Record<string, any>>Optional configuration for the tool.

Returns

Promise<string>

A Promise that resolves with a string.

Overrides

DynamicStructuredTool.invoke

Released under the GPL-3.0 License.