ToolRegistry
Defined in: core/src/tools.ts:206
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ToolRegistry(tools?): ToolRegistry;Defined in: core/src/tools.ts:209
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
tools |
readonly Tool<unknown, unknown>[] |
[] |
Returns
Section titled “Returns”ToolRegistry
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get names(): string[];Defined in: core/src/tools.ts:226
Returns
Section titled “Returns”string[]
Methods
Section titled “Methods”definitions()
Section titled “definitions()”definitions(allow?): ToolDefinition[];Defined in: core/src/tools.ts:236
Definitions for an allow-list, in the order given. This is the order the model reads them in, and it is part of the cached prompt prefix. Reordering or appending mid-conversation invalidates that prefix, so a caller that cares should freeze the list when the session opens.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
allow? |
readonly string[] |
Returns
Section titled “Returns”get(name): | Tool<unknown, unknown> | undefined;Defined in: core/src/tools.ts:218
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
Returns
Section titled “Returns”| Tool<unknown, unknown>
| undefined
has(name): boolean;Defined in: core/src/tools.ts:222
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
Returns
Section titled “Returns”boolean
register()
Section titled “register()”register(tool): this;Defined in: core/src/tools.ts:213
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
tool |
Tool |
Returns
Section titled “Returns”this