executeTool
codebolt.mcp.executeTool(toolName: string, params: any, mcpServer: string (optional)): Promise<any>
Executes a specified tool with the provided parameters.
Parameters
Name | Type | Description |
---|---|---|
toolName | string | The name of the tool to execute. |
params | any | Parameters required for executing the tool. |
mcpServer | string (optional) | The MCP server to use for execution. |
Returns:
Promise<any>
A promise that resolves with the tool execution result.Example
// Example: Executing a tool
const result = await codebolt.mcp.executeTool("imageProcessor", { imageUrl: "https://example.com/image.jpg" });
console.log("Tool Execution Result:", result);