Preparing search index...
The search index is not available
Genkit JS API reference
Genkit JS API reference
genkit
tool
asTool
Function asTool
asTool
<
I
extends
ZodType
<
any
,
any
,
any
,
I
>
,
O
extends
ZodType
<
any
,
any
,
any
,
O
>
>
(
registry
:
Registry
,
action
:
Action
<
I
,
O
,
ZodTypeAny
>
,
)
:
ToolAction
<
I
,
O
>
Converts an action to a tool action by setting the appropriate metadata.
Type Parameters
I
extends
ZodType
<
any
,
any
,
any
,
I
>
O
extends
ZodType
<
any
,
any
,
any
,
O
>
Parameters
registry
:
Registry
action
:
Action
<
I
,
O
,
ZodTypeAny
>
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.