Skip to content

tool

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.

INPUT

OUTPUT

CONTEXT extends Context

Tool<INPUT, OUTPUT, CONTEXT> & object

ExecutableTool<Tool<INPUT, OUTPUT, CONTEXT>>

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.

INPUT

OUTPUT

CONTEXT extends Context

Tool<INPUT, OUTPUT, CONTEXT>

Tool<INPUT, OUTPUT, CONTEXT>

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.

INPUT

CONTEXT extends Context

Tool<INPUT, never, CONTEXT>

Tool<INPUT, never, CONTEXT>

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.

OUTPUT

CONTEXT extends Context

Tool<never, OUTPUT, CONTEXT>

Tool<never, OUTPUT, CONTEXT>

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.

CONTEXT extends Context

Tool<never, never, CONTEXT>

Tool<never, never, CONTEXT>