agents / Exports / ToolRegistry
Class: ToolRegistry
Tool registry implementation Manages tool registration, validation, and retrieval
Implements
Table of contents
Constructors
Methods
Constructors
constructor
• new ToolRegistry(): ToolRegistry
Returns
Methods
register
▸ register(tool): void
Register a tool
Parameters
| Name | Type |
|---|---|
tool | ToolInterface |
Returns
void
Implementation of
ToolRegistryInterface.register
Defined in
packages/agents/src/tools/registry/tool-registry.ts:16
unregister
▸ unregister(name): void
Unregister a tool
Parameters
| Name | Type |
|---|---|
name | string |
Returns
void
Implementation of
ToolRegistryInterface.unregister
Defined in
packages/agents/src/tools/registry/tool-registry.ts:45
get
▸ get(name): undefined | ToolInterface
Get tool by name
Parameters
| Name | Type |
|---|---|
name | string |
Returns
undefined | ToolInterface
Implementation of
Defined in
packages/agents/src/tools/registry/tool-registry.ts:58
getAll
▸ getAll(): ToolInterface[]
Get all registered tools
Returns
Implementation of
Defined in
packages/agents/src/tools/registry/tool-registry.ts:65
getSchemas
▸ getSchemas(): ToolSchema[]
Get tool schemas
Returns
Implementation of
ToolRegistryInterface.getSchemas
Defined in
packages/agents/src/tools/registry/tool-registry.ts:72
has
▸ has(name): boolean
Check if tool exists
Parameters
| Name | Type |
|---|---|
name | string |
Returns
boolean
Implementation of
Defined in
packages/agents/src/tools/registry/tool-registry.ts:79
clear
▸ clear(): void
Clear all tools
Returns
void
Implementation of
Defined in
packages/agents/src/tools/registry/tool-registry.ts:86
getToolNames
▸ getToolNames(): string[]
Get tool names
Returns
string[]
Defined in
packages/agents/src/tools/registry/tool-registry.ts:95
getToolsByPattern
▸ getToolsByPattern(pattern): ToolInterface[]
Get tools by pattern
Parameters
| Name | Type |
|---|---|
pattern | string | RegExp |
Returns
Defined in
packages/agents/src/tools/registry/tool-registry.ts:102
size
▸ size(): number
Get tool count
Returns
number