<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[agents](../../) / [Exports](../modules) / IFunctionTool

# Interface: IFunctionTool

Function tool implementation

## Hierarchy

- [`IToolInterface`](IToolInterface)

  ↳ **`IFunctionTool`**

## Implemented by

- [`FunctionTool`](../classes/FunctionTool)

## Table of contents

### Properties

- [schema](IFunctionTool#schema)
- [fn](IFunctionTool#fn)

### Methods

- [execute](IFunctionTool#execute)
- [validate](IFunctionTool#validate)
- [validateParameters](IFunctionTool#validateparameters)
- [getDescription](IFunctionTool#getdescription)

## Properties

### schema

• **schema**: [`IToolSchema`](IToolSchema)

Tool schema

#### Inherited from

[IToolInterface](IToolInterface).[schema](IToolInterface#schema)

#### Defined in

[packages/agents/src/interfaces/tool.ts:207](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L207)

---

### fn

• **fn**: [`TToolExecutor`](../modules#ttoolexecutor)\<[`TToolParameters`](../modules#ttoolparameters), [`TUniversalValue`](../modules#tuniversalvalue)\>

Function to execute

#### Defined in

[packages/agents/src/interfaces/tool.ts:235](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L235)

## Methods

### execute

▸ **execute**(`parameters`, `context?`): `Promise`\<[`IToolResult`](IToolResult)\>

Execute the tool with given parameters

#### Parameters

| Name         | Type                                             |
| :----------- | :----------------------------------------------- |
| `parameters` | [`TToolParameters`](../modules#ttoolparameters)  |
| `context?`   | [`IToolExecutionContext`](IToolExecutionContext) |

#### Returns

`Promise`\<[`IToolResult`](IToolResult)\>

#### Inherited from

[IToolInterface](IToolInterface).[execute](IToolInterface#execute)

#### Defined in

[packages/agents/src/interfaces/tool.ts:212](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L212)

---

### validate

▸ **validate**(`parameters`): `boolean`

Validate tool parameters

#### Parameters

| Name         | Type                                            |
| :----------- | :---------------------------------------------- |
| `parameters` | [`TToolParameters`](../modules#ttoolparameters) |

#### Returns

`boolean`

#### Inherited from

[IToolInterface](IToolInterface).[validate](IToolInterface#validate)

#### Defined in

[packages/agents/src/interfaces/tool.ts:217](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L217)

---

### validateParameters

▸ **validateParameters**(`parameters`): [`IParameterValidationResult`](IParameterValidationResult)

Validate tool parameters with detailed result

#### Parameters

| Name         | Type                                            |
| :----------- | :---------------------------------------------- |
| `parameters` | [`TToolParameters`](../modules#ttoolparameters) |

#### Returns

[`IParameterValidationResult`](IParameterValidationResult)

#### Inherited from

[IToolInterface](IToolInterface).[validateParameters](IToolInterface#validateparameters)

#### Defined in

[packages/agents/src/interfaces/tool.ts:222](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L222)

---

### getDescription

▸ **getDescription**(): `string`

Get tool description

#### Returns

`string`

#### Inherited from

[IToolInterface](IToolInterface).[getDescription](IToolInterface#getdescription)

#### Defined in

[packages/agents/src/interfaces/tool.ts:227](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L227)
