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 Signature

get active(): boolean

Returns

boolean

Set Signature

set active(active): void

Parameters
ParameterType
activeboolean
Returns

void

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 | {}The input for the tool.
config?RunnableConfigOptional configuration for the tool.

Returns

Promise<string>

A Promise that resolves with a string.

Overrides

DynamicStructuredTool.invoke

Released under the GPL-3.0 License.