Genkit JS API reference
Preparing search index...
genkit
tool
toToolDefinition
Function toToolDefinition
toToolDefinition
(
tool
:
Action
<
z
.
ZodTypeAny
,
z
.
ZodTypeAny
>
,
)
:
{
description
:
string
;
inputSchema
?:
Record
<
string
,
any
>
|
null
;
metadata
?:
Record
<
string
,
any
>
;
name
:
string
;
outputSchema
?:
Record
<
string
,
any
>
|
null
;
}
Converts a tool action to a definition of the tool to be passed to a model.
Parameters
tool
:
Action
<
z
.
ZodTypeAny
,
z
.
ZodTypeAny
>
Returns
{
description
:
string
;
inputSchema
?:
Record
<
string
,
any
>
|
null
;
metadata
?:
Record
<
string
,
any
>
;
name
:
string
;
outputSchema
?:
Record
<
string
,
any
>
|
null
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Genkit JS API reference
Loading...
Converts a tool action to a definition of the tool to be passed to a model.