Action
type Action<TInput, TOutput> = { description?: string; execute: (context) => Promise<z.infer<TOutput>>; id: string; input: TInput; name: string; output: TOutput;};Defined in: core/src/action/action.types.ts:31
A callable tool: identified by id, with Zod-validated input and output
schemas and an execute that runs the tool given an ActionContext.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TInput extends z.ZodType |
z.ZodType |
TOutput extends z.ZodType |
z.ZodType |
Properties
Section titled “Properties”description?
Section titled “description?”optional description?: string;Defined in: core/src/action/action.types.ts:34
execute
Section titled “execute”execute: (context) => Promise<z.infer<TOutput>>;Defined in: core/src/action/action.types.ts:37
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
ActionContext<TInput> |
Returns
Section titled “Returns”Promise<z.infer<TOutput>>
id: string;Defined in: core/src/action/action.types.ts:32
input: TInput;Defined in: core/src/action/action.types.ts:35
name: string;Defined in: core/src/action/action.types.ts:33
output
Section titled “output”output: TOutput;Defined in: core/src/action/action.types.ts:36