create Method

Look up a tool by toolId and, if found, create an instance with the supplied arguments.

create(toolId: string, ...args: any[]): undefined | Tool

Parameter Type Description
toolId string the toolId of the tool
...args any[] arguments to pass to the constructor.

Returns - undefined | Tool

an instance of the registered Tool class, or undefined if toolId is not registered.

Defined in

Last Updated: 11 June, 2024