tool
Call Signature
Section titled “Call Signature”tool<
INPUT,OUTPUT,CONTEXT>(tool):ExecutableTool<Tool<INPUT,OUTPUT,CONTEXT>>
Defined in: node_modules/.bun/@ai-sdk+provider-utils@5.0.53+bca6845d7a0cc15a/node_modules/@ai-sdk/provider-utils/dist/index.d.ts:2303
Infer the tool type from a tool object.
This is useful for type inference when working with tool objects.
When the input has an execute function, the return type narrows to
ExecutableTool<Tool<...>> so that .execute is non-nullable without
needing isExecutableTool or a ! assertion at the call site.
Type Parameters
Section titled “Type Parameters”INPUT
OUTPUT
Section titled “OUTPUT”OUTPUT
CONTEXT
Section titled “CONTEXT”CONTEXT extends Context
Parameters
Section titled “Parameters”Tool<INPUT, OUTPUT, CONTEXT> & object
Returns
Section titled “Returns”ExecutableTool<Tool<INPUT, OUTPUT, CONTEXT>>
Call Signature
Section titled “Call Signature”tool<
INPUT,OUTPUT,CONTEXT>(tool):Tool<INPUT,OUTPUT,CONTEXT>
Defined in: node_modules/.bun/@ai-sdk+provider-utils@5.0.53+bca6845d7a0cc15a/node_modules/@ai-sdk/provider-utils/dist/index.d.ts:2306
Infer the tool type from a tool object.
This is useful for type inference when working with tool objects.
When the input has an execute function, the return type narrows to
ExecutableTool<Tool<...>> so that .execute is non-nullable without
needing isExecutableTool or a ! assertion at the call site.
Type Parameters
Section titled “Type Parameters”INPUT
OUTPUT
Section titled “OUTPUT”OUTPUT
CONTEXT
Section titled “CONTEXT”CONTEXT extends Context
Parameters
Section titled “Parameters”Tool<INPUT, OUTPUT, CONTEXT>
Returns
Section titled “Returns”Tool<INPUT, OUTPUT, CONTEXT>
Call Signature
Section titled “Call Signature”tool<
INPUT,CONTEXT>(tool):Tool<INPUT,never,CONTEXT>
Defined in: node_modules/.bun/@ai-sdk+provider-utils@5.0.53+bca6845d7a0cc15a/node_modules/@ai-sdk/provider-utils/dist/index.d.ts:2307
Infer the tool type from a tool object.
This is useful for type inference when working with tool objects.
When the input has an execute function, the return type narrows to
ExecutableTool<Tool<...>> so that .execute is non-nullable without
needing isExecutableTool or a ! assertion at the call site.
Type Parameters
Section titled “Type Parameters”INPUT
CONTEXT
Section titled “CONTEXT”CONTEXT extends Context
Parameters
Section titled “Parameters”Tool<INPUT, never, CONTEXT>
Returns
Section titled “Returns”Tool<INPUT, never, CONTEXT>
Call Signature
Section titled “Call Signature”tool<
OUTPUT,CONTEXT>(tool):Tool<never,OUTPUT,CONTEXT>
Defined in: node_modules/.bun/@ai-sdk+provider-utils@5.0.53+bca6845d7a0cc15a/node_modules/@ai-sdk/provider-utils/dist/index.d.ts:2308
Infer the tool type from a tool object.
This is useful for type inference when working with tool objects.
When the input has an execute function, the return type narrows to
ExecutableTool<Tool<...>> so that .execute is non-nullable without
needing isExecutableTool or a ! assertion at the call site.
Type Parameters
Section titled “Type Parameters”OUTPUT
Section titled “OUTPUT”OUTPUT
CONTEXT
Section titled “CONTEXT”CONTEXT extends Context
Parameters
Section titled “Parameters”Tool<never, OUTPUT, CONTEXT>
Returns
Section titled “Returns”Tool<never, OUTPUT, CONTEXT>
Call Signature
Section titled “Call Signature”tool<
CONTEXT>(tool):Tool<never,never,CONTEXT>
Defined in: node_modules/.bun/@ai-sdk+provider-utils@5.0.53+bca6845d7a0cc15a/node_modules/@ai-sdk/provider-utils/dist/index.d.ts:2309
Infer the tool type from a tool object.
This is useful for type inference when working with tool objects.
When the input has an execute function, the return type narrows to
ExecutableTool<Tool<...>> so that .execute is non-nullable without
needing isExecutableTool or a ! assertion at the call site.
Type Parameters
Section titled “Type Parameters”CONTEXT
Section titled “CONTEXT”CONTEXT extends Context
Parameters
Section titled “Parameters”Tool<never, never, CONTEXT>
Returns
Section titled “Returns”Tool<never, never, CONTEXT>