Defined in: mcp-tool.ts:38
Exposes one MCP service method as a tool.
Implements
Constructors
Constructor
new MCPTool(config): MCPTool;
Defined in: mcp-tool.ts:49
Parameters
| Parameter | Type |
|---|---|
config |
MCPToolConfig |
Returns
MCPTool
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
description |
readonly |
string |
Description that tells the model when to use the tool. | mcp-tool.ts:40 |
name |
readonly |
string |
Unique tool name. | mcp-tool.ts:39 |
parameters |
readonly |
ToolParameters | undefined |
JSON Schema of the arguments. | mcp-tool.ts:41 |
Methods
invoke()
invoke(args): Promise<unknown>;
Defined in: mcp-tool.ts:65
Calls the MCP method.
Parameters
| Parameter | Type |
|---|---|
args |
Record<string, unknown> |
Returns
Promise<unknown>
Throws
Error that wraps the client error message.