<!--
 ⚠️  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) / ToolRegistry

# Class: ToolRegistry

Tool registry implementation
Manages tool registration, validation, and retrieval

## Implements

- [`IToolRegistry`](../interfaces/IToolRegistry)

## Table of contents

### Constructors

- [constructor](ToolRegistry#constructor)

### Methods

- [register](ToolRegistry#register)
- [unregister](ToolRegistry#unregister)
- [get](ToolRegistry#get)
- [getAll](ToolRegistry#getall)
- [getSchemas](ToolRegistry#getschemas)
- [has](ToolRegistry#has)
- [clear](ToolRegistry#clear)
- [getToolNames](ToolRegistry#gettoolnames)
- [getToolsByPattern](ToolRegistry#gettoolsbypattern)
- [size](ToolRegistry#size)

## Constructors

### constructor

• **new ToolRegistry**(): [`ToolRegistry`](ToolRegistry)

#### Returns

[`ToolRegistry`](ToolRegistry)

## Methods

### register

▸ **register**(`tool`): `void`

Register a tool

#### Parameters

| Name   | Type                                             |
| :----- | :----------------------------------------------- |
| `tool` | [`IToolInterface`](../interfaces/IToolInterface) |

#### Returns

`void`

#### Implementation of

[IToolRegistry](../interfaces/IToolRegistry).[register](../interfaces/IToolRegistry#register)

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:16](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L16)

---

### unregister

▸ **unregister**(`name`): `void`

Unregister a tool

#### Parameters

| Name   | Type     |
| :----- | :------- |
| `name` | `string` |

#### Returns

`void`

#### Implementation of

[IToolRegistry](../interfaces/IToolRegistry).[unregister](../interfaces/IToolRegistry#unregister)

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:45](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L45)

---

### get

▸ **get**(`name`): `undefined` \| [`IToolInterface`](../interfaces/IToolInterface)

Get tool by name

#### Parameters

| Name   | Type     |
| :----- | :------- |
| `name` | `string` |

#### Returns

`undefined` \| [`IToolInterface`](../interfaces/IToolInterface)

#### Implementation of

[IToolRegistry](../interfaces/IToolRegistry).[get](../interfaces/IToolRegistry#get)

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:58](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L58)

---

### getAll

▸ **getAll**(): [`IToolInterface`](../interfaces/IToolInterface)[]

Get all registered tools

#### Returns

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

#### Implementation of

[IToolRegistry](../interfaces/IToolRegistry).[getAll](../interfaces/IToolRegistry#getall)

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:65](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L65)

---

### getSchemas

▸ **getSchemas**(): [`IToolSchema`](../interfaces/IToolSchema)[]

Get tool schemas

#### Returns

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

#### Implementation of

[IToolRegistry](../interfaces/IToolRegistry).[getSchemas](../interfaces/IToolRegistry#getschemas)

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:72](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L72)

---

### has

▸ **has**(`name`): `boolean`

Check if tool exists

#### Parameters

| Name   | Type     |
| :----- | :------- |
| `name` | `string` |

#### Returns

`boolean`

#### Implementation of

[IToolRegistry](../interfaces/IToolRegistry).[has](../interfaces/IToolRegistry#has)

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:92](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L92)

---

### clear

▸ **clear**(): `void`

Clear all tools

#### Returns

`void`

#### Implementation of

[IToolRegistry](../interfaces/IToolRegistry).[clear](../interfaces/IToolRegistry#clear)

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:99](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L99)

---

### getToolNames

▸ **getToolNames**(): `string`[]

Get tool names

#### Returns

`string`[]

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:108](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L108)

---

### getToolsByPattern

▸ **getToolsByPattern**(`pattern`): [`IToolInterface`](../interfaces/IToolInterface)[]

Get tools by pattern

#### Parameters

| Name      | Type                 |
| :-------- | :------------------- |
| `pattern` | `string` \| `RegExp` |

#### Returns

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

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:115](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L115)

---

### size

▸ **size**(): `number`

Get tool count

#### Returns

`number`

#### Defined in

[packages/agents/src/tools/registry/tool-registry.ts:123](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/tools/registry/tool-registry.ts#L123)
