agents / Exports / IFunctionTool
Interface: IFunctionTool
Function tool implementation
Hierarchy
↳
IFunctionTool
Implemented by
Table of contents
Properties
Methods
Properties
schema
• schema: IToolSchema
Tool schema
Inherited from
Defined in
packages/agents/src/interfaces/tool.ts:207
fn
• fn: TToolExecutor<TToolParameters, TUniversalValue>
Function to execute
Defined in
packages/agents/src/interfaces/tool.ts:235
Methods
execute
▸ execute(parameters, context?): Promise<IToolResult>
Execute the tool with given parameters
Parameters
| Name | Type |
|---|---|
parameters | TToolParameters |
context? | IToolExecutionContext |
Returns
Promise<IToolResult>
Inherited from
Defined in
packages/agents/src/interfaces/tool.ts:212
validate
▸ validate(parameters): boolean
Validate tool parameters
Parameters
| Name | Type |
|---|---|
parameters | TToolParameters |
Returns
boolean
Inherited from
Defined in
packages/agents/src/interfaces/tool.ts:217
validateParameters
▸ validateParameters(parameters): IParameterValidationResult
Validate tool parameters with detailed result
Parameters
| Name | Type |
|---|---|
parameters | TToolParameters |
Returns
Inherited from
IToolInterface.validateParameters
Defined in
packages/agents/src/interfaces/tool.ts:222
getDescription
▸ getDescription(): string
Get tool description
Returns
string