Class: GetWeatherTool
Defined in: src/agent/tools/GetWeatherTool.ts:17
A tool that gets the current weather for a specific location.
Extends
Constructors
Constructor
new GetWeatherTool():
GetWeatherTool
Defined in: src/agent/tools/GetWeatherTool.ts:18
Returns
GetWeatherTool
Overrides
Properties
description?
optional
description:string
Defined in: src/agent/Tool.ts:31
Inherited from
name
name:
string
Defined in: src/agent/Tool.ts:30
Inherited from
onTriggered()?
optional
onTriggered: (args
) =>unknown
Defined in: src/agent/Tool.ts:33
Parameters
args
unknown
Returns
unknown
Inherited from
parameters?
optional
parameters:ToolSchema
Defined in: src/agent/Tool.ts:32
Inherited from
Methods
execute()
execute(
args
):Promise
<GetWeatherToolResults
>
Defined in: src/agent/tools/GetWeatherTool.ts:44
Executes the tool's action.
Parameters
args
The arguments for the tool.
Returns
Promise
<GetWeatherToolResults
>
A promise that resolves with the weather information.
Overrides
toJSON()
toJSON():
FunctionDeclaration
Defined in: src/agent/Tool.ts:62
Returns a JSON representation of the tool.
Returns
FunctionDeclaration
A valid FunctionDeclaration object.