Skip to content

tools / Exports / ToolProvider

Interface: ToolProvider

Tool Provider interface

Unified interface for various tool providers (MCP, OpenAPI, ZodFunction, etc.) Tool providers enable AI models to call tools.

Table of contents

Properties

Methods

Properties

functions

Optional functions: FunctionSchema[]

List of all function schemas provided by the tool provider Used when passing tool list to AI models.

Defined in

packages/tools/src/tool-provider.ts:23

Methods

callTool

callTool(toolName, parameters): Promise<any>

Call a tool. All tool providers must implement this interface.

Parameters

NameTypeDescription
toolNamestringName of the tool to call
parametersRecord<string, any>Parameters to pass to the tool

Returns

Promise<any>

Tool call result

Defined in

packages/tools/src/tool-provider.ts:17

Released under the MIT License.