<!--
 ⚠️  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
-->

[playground](../../) / [Exports](../modules) / UniversalToolFactory

# Class: UniversalToolFactory

Universal Tool Factory
Provides a unified interface for creating any type of tool with automatic block tracking
Leverages the universal Hook system from @robota-sdk/agent-core

## Table of contents

### Constructors

- [constructor](UniversalToolFactory#constructor)

### Methods

- [createFunctionTool](UniversalToolFactory#createfunctiontool)
- [createOpenAPITool](UniversalToolFactory#createopenapitool)
- [createMCPTool](UniversalToolFactory#createmcptool)
- [createDelegationTool](UniversalToolFactory#createdelegationtool)
- [getBlockCollector](UniversalToolFactory#getblockcollector)

## Constructors

### constructor

• **new UniversalToolFactory**(`options`): [`UniversalToolFactory`](UniversalToolFactory)

#### Parameters

| Name      | Type                                                                         |
| :-------- | :--------------------------------------------------------------------------- |
| `options` | [`IUniversalToolFactoryOptions`](../interfaces/IUniversalToolFactoryOptions) |

#### Returns

[`UniversalToolFactory`](UniversalToolFactory)

#### Defined in

[playground/src/lib/playground/universal-tool-factory.ts:39](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/universal-tool-factory.ts#L39)

## Methods

### createFunctionTool

▸ **createFunctionTool**(`schema`, `executor`, `options?`): `FunctionTool`

Create FunctionTool with block tracking

#### Parameters

| Name                     | Type             |
| :----------------------- | :--------------- |
| `schema`                 | `IToolSchema`    |
| `executor`               | `TToolExecutor`  |
| `options`                | `Object`         |
| `options.parentBlockId?` | `string`         |
| `options.level?`         | `number`         |
| `options.logger?`        | `AbstractLogger` |

#### Returns

`FunctionTool`

#### Defined in

[playground/src/lib/playground/universal-tool-factory.ts:47](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/universal-tool-factory.ts#L47)

---

### createOpenAPITool

▸ **createOpenAPITool**(`_config`, `options?`): `null`

Create OpenAPITool with block tracking
Note: OpenAPITool not available in current SDK version

#### Parameters

| Name                     | Type                                    |
| :----------------------- | :-------------------------------------- |
| `_config`                | `Record`\<`string`, `TUniversalValue`\> |
| `options`                | `Object`                                |
| `options.parentBlockId?` | `string`                                |
| `options.level?`         | `number`                                |
| `options.logger?`        | `AbstractLogger`                        |

#### Returns

`null`

#### Defined in

[playground/src/lib/playground/universal-tool-factory.ts:64](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/universal-tool-factory.ts#L64)

---

### createMCPTool

▸ **createMCPTool**(`_config`, `_schema`, `options?`): `null`

Create MCPTool with block tracking
Note: MCPTool not available in current SDK version

#### Parameters

| Name                     | Type                                    |
| :----------------------- | :-------------------------------------- |
| `_config`                | `Record`\<`string`, `TUniversalValue`\> |
| `_schema`                | `Record`\<`string`, `TUniversalValue`\> |
| `options`                | `Object`                                |
| `options.parentBlockId?` | `string`                                |
| `options.level?`         | `number`                                |
| `options.logger?`        | `AbstractLogger`                        |

#### Returns

`null`

#### Defined in

[playground/src/lib/playground/universal-tool-factory.ts:81](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/universal-tool-factory.ts#L81)

---

### createDelegationTool

▸ **createDelegationTool**(`_teamContainer`, `_availableTemplates`, `options?`): `null`

Create AgentDelegationTool with delegation tracking
Note: AgentDelegationTool not available in current SDK version

#### Parameters

| Name                     | Type                                      |
| :----------------------- | :---------------------------------------- |
| `_teamContainer`         | `Record`\<`string`, `TUniversalValue`\>   |
| `_availableTemplates`    | `Record`\<`string`, `TUniversalValue`\>[] |
| `options`                | `Object`                                  |
| `options.parentBlockId?` | `string`                                  |
| `options.level?`         | `number`                                  |
| `options.logger?`        | `AbstractLogger`                          |

#### Returns

`null`

#### Defined in

[playground/src/lib/playground/universal-tool-factory.ts:99](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/universal-tool-factory.ts#L99)

---

### getBlockCollector

▸ **getBlockCollector**(): [`IBlockDataCollector`](../interfaces/IBlockDataCollector)

Get block collector for direct access

#### Returns

[`IBlockDataCollector`](../interfaces/IBlockDataCollector)

#### Defined in

[playground/src/lib/playground/universal-tool-factory.ts:116](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/universal-tool-factory.ts#L116)
