Defined in: packages/components/src/agents/types.ts:67
Tool shape accepted by agents. A tool runs through execute(args) or, when that is
absent, invoke(args) (as in @astack-tech/tools). A tool with neither is reported
to the model as an error when it is called.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
description |
string |
Description that tells the model when to use the tool. | packages/components/src/agents/types.ts:71 |
execute? |
(args) => unknown |
Runs the tool. Takes precedence over invoke. |
packages/components/src/agents/types.ts:78 |
invoke? |
(args) => unknown |
Runs the tool when execute is absent. |
packages/components/src/agents/types.ts:83 |
name |
string |
Unique tool name. | packages/components/src/agents/types.ts:69 |
parameters? |
Record<string, unknown> |
JSON Schema of the arguments. | packages/components/src/agents/types.ts:73 |