Skip to content

agents / Exports / IFunctionTool

Interface: IFunctionTool

Function tool implementation

Hierarchy

Implemented by

Table of contents

Properties

Methods

Properties

schema

schema: IToolSchema

Tool schema

Inherited from

IToolInterface.schema

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

NameType
parametersTToolParameters
context?IToolExecutionContext

Returns

Promise<IToolResult>

Inherited from

IToolInterface.execute

Defined in

packages/agents/src/interfaces/tool.ts:212


validate

validate(parameters): boolean

Validate tool parameters

Parameters

NameType
parametersTToolParameters

Returns

boolean

Inherited from

IToolInterface.validate

Defined in

packages/agents/src/interfaces/tool.ts:217


validateParameters

validateParameters(parameters): IParameterValidationResult

Validate tool parameters with detailed result

Parameters

NameType
parametersTToolParameters

Returns

IParameterValidationResult

Inherited from

IToolInterface.validateParameters

Defined in

packages/agents/src/interfaces/tool.ts:222


getDescription

getDescription(): string

Get tool description

Returns

string

Inherited from

IToolInterface.getDescription

Defined in

packages/agents/src/interfaces/tool.ts:227

Released under the MIT License.