agents / Exports / TypeSafeToolInterface
Interface: TypeSafeToolInterface<TParameters, TResult>
Type-safe tool interface with type parameters
Type parameters
| Name | Type | Description |
|---|---|---|
TParameters | BaseToolParameters | Tool parameters type (defaults to BaseToolParameters for backward compatibility) |
TResult | ToolResult | Tool result type (defaults to ToolResult for backward compatibility) |
Implemented by
Table of contents
Properties
Methods
Properties
schema
• Readonly schema: ToolSchema
Defined in
packages/agents/src/abstracts/base-tool.ts:57
Methods
execute
▸ execute(parameters, context?): Promise<TResult>
Parameters
| Name | Type |
|---|---|
parameters | TParameters |
context? | ToolExecutionContext |
Returns
Promise<TResult>
Defined in
packages/agents/src/abstracts/base-tool.ts:58
validate
▸ validate(parameters): boolean
Parameters
| Name | Type |
|---|---|
parameters | TParameters |
Returns
boolean
Defined in
packages/agents/src/abstracts/base-tool.ts:59
validateParameters
▸ validateParameters(parameters): ParameterValidationResult
Parameters
| Name | Type |
|---|---|
parameters | TParameters |
Returns
Defined in
packages/agents/src/abstracts/base-tool.ts:60
getDescription
▸ getDescription(): string
Returns
string
Defined in
packages/agents/src/abstracts/base-tool.ts:61
getName
▸ getName(): string
Returns
string