UNPKG

@webdevtoday/grok-cli

Version:

A sophisticated CLI tool for interacting with xAI Grok 4, featuring conversation history, file reference, custom commands, memory system, and genetic development workflows

59 lines 1.81 kB
/** * MCP Tool Integration * Wraps MCP server tools to integrate them into the main tool system */ import { BaseTool, type ToolExecutor } from './base'; import type { ToolResult } from '../types'; import type { McpClient } from '../core/mcp-client'; /** * Dynamic MCP tool that wraps an MCP server tool */ export declare class McpTool extends BaseTool { private mcpClient; readonly serverName: string; readonly toolName: string; readonly inputSchema: any; constructor(serverName: string, toolName: string, description: string, inputSchema: any, mcpClient: McpClient); execute(params: Record<string, unknown>): Promise<ToolResult>; validateParams(params: Record<string, unknown>): boolean; } /** * MCP Tool Manager - manages dynamic registration of MCP tools */ export declare class McpToolManager { private toolExecutor; private mcpClient; private registeredTools; constructor(toolExecutor: ToolExecutor, mcpClient: McpClient); /** * Register all tools from a connected MCP server */ registerServerTools(serverName: string): Promise<void>; /** * Unregister all tools from a disconnected MCP server */ unregisterServerTools(serverName: string): Promise<void>; /** * Refresh all registered MCP tools */ refreshAllTools(): Promise<void>; /** * Get statistics about registered MCP tools */ getStats(): { totalTools: number; toolsByServer: Record<string, number>; registeredTools: string[]; }; /** * List all registered MCP tools with details */ listRegisteredTools(): Array<{ name: string; serverName: string; toolName: string; description: string; status: string; }>; } //# sourceMappingURL=mcp.d.ts.map