import { Command } from 'commander'; /** * CLI command for dynamic MCP server tool operations via API. * * This command provides a simplified CLI interface for interacting with MCP server tools, * supporting four actions: list-servers, list-tools, get-tool, and call-tool. It wraps * the HTTP API endpoints and requires the MCP Hub Lite server to be running. * * ## Command Format * * ``` * npm run server [toolName] [--args ] [--tags ] * ``` * * ## Supported Actions * * - `list-servers` - List all connected MCP servers * - `list-tools` - List all tools from the specified server * - `get-tool ` - Get complete schema for a specific tool * - `call-tool ` - Call a tool on the specified server * * ## Options * * - `--args ` - JSON string of tool arguments (for call-tool action) * - `--tags ` - JSON object of instance selection tags (call-tool only, for multi-instance servers) * * ## Usage Examples * * ```bash * # List all connected servers * npm run server mcp-hub-lite list-servers * * # List all tools from a specific server * npm run server mcp-hub-lite list-tools * * # Get tool schema * npm run server mcp-hub-lite get-tool list_tools * * # Call a tool with arguments * npm run server mcp-hub-lite call-tool list_tools --args '{"serverName":"mcp-hub-lite"}' * * # Call a tool with tags for multi-instance selection * npm run server baidu-search call-tool search --args '{"query":"天气"}' --tags '{"env":"prod"}' * ``` * * ## Error Handling * * - Exits with code 1 if the server is not running * - Exits with code 1 if action is unknown * - Exits with code 1 if toolName is required but not provided * - Exits with code 1 if JSON parsing fails for --args or --tags * - Exits with code 1 if the underlying API call fails * * @returns {Command} The configured server command instance for registration with Commander.js */ export declare const serverCommand: Command; //# sourceMappingURL=server.d.ts.map