Class: GetWeatherTool
Defined in: src/agent/tools/GetWeatherTool.ts:16
A tool that gets the current weather for a specific location.
Extends
Constructors
Constructor
new GetWeatherTool():
GetWeatherTool
Defined in: src/agent/tools/GetWeatherTool.ts:17
Returns
GetWeatherTool
Overrides
Properties
behavior?
optionalbehavior:"BLOCKING"|"NON_BLOCKING"
Defined in: src/agent/Tool.ts:53
Inherited from
description?
optionaldescription:string
Defined in: src/agent/Tool.ts:50
Inherited from
name
name:
string
Defined in: src/agent/Tool.ts:49
Inherited from
onTriggered()?
optionalonTriggered: (args) =>unknown
Defined in: src/agent/Tool.ts:52
Parameters
args
unknown
Returns
unknown
Inherited from
parameters?
optionalparameters:ToolSchema
Defined in: src/agent/Tool.ts:51
Inherited from
Methods
execute()
execute(
args):Promise<ToolResult<WeatherData>>
Defined in: src/agent/tools/GetWeatherTool.ts:43
Executes the tool's action.
Parameters
args
The arguments for the tool.
Returns
Promise<ToolResult<WeatherData>>
A promise that resolves with a ToolResult containing weather information.
Overrides
toJSON()
toJSON():
FunctionDeclaration
Defined in: src/agent/Tool.ts:97
Returns a JSON representation of the tool.
Returns
FunctionDeclaration
A valid FunctionDeclaration object.