Genkit JS API reference
Preparing search index...
genkit
tool
asTool
Function asTool
asTool
<
I
extends
z
.
ZodTypeAny
,
O
extends
z
.
ZodTypeAny
>
(
registry
:
Registry
,
action
:
Action
<
I
,
O
>
,
)
:
ToolAction
<
I
,
O
>
Converts an action to a tool action by setting the appropriate metadata.
Type Parameters
I
extends
z
.
ZodTypeAny
O
extends
z
.
ZodTypeAny
Parameters
registry
:
Registry
action
:
Action
<
I
,
O
>
Returns
ToolAction
<
I
,
O
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Genkit JS API reference
Loading...
Converts an action to a tool action by setting the appropriate metadata.