Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/tools / / ToolSpec
Type Alias: ToolSpec<TInput, TOutput, TDeps>
ts
type ToolSpec<TInput, TOutput, TDeps> = Omit<Tool<TInput, TOutput, TDeps>, "execute"> & {
execute: (input, ctx) => Promise<
| TOutput
| ToolReturn<TOutput>
| void>;
};Defined in: packages/tools/src/builder/tool.ts:26
Spec accepted by the tool factory. Mirrors the Tool interface but accepts the execute field as the second positional parameter or as a property — both work equivalently.
Type Declaration
| Name | Type | Defined in |
|---|---|---|
execute() | (input, ctx) => Promise< | TOutput | ToolReturn<TOutput> | void> | packages/tools/src/builder/tool.ts:30 |
Type Parameters
| Type Parameter | Default type |
|---|---|
TInput | unknown |
TOutput | unknown |
TDeps | unknown |