evolution-api-mcp
Version:
MCP Server for Evolution API v2 - Integrate WhatsApp functionality with Claude Desktop and other MCP clients
78 lines (77 loc) • 2.25 kB
TypeScript
/**
* MCP Tool Generator
* Dynamically generates and registers MCP tools from Evolution API endpoints
*/
import { ToolInfo, ToolFactoryConfig } from './types';
import { ControllerType } from '../registry/types';
import { McpToolRegistry } from './tool-registry';
import { McpToolFactory } from './tool-factory';
/**
* Tool generator configuration
*/
export interface ToolGeneratorConfig extends ToolFactoryConfig {
controllers?: ControllerType[];
excludeEndpoints?: string[];
includeEndpoints?: string[];
toolNamePrefix?: string;
}
/**
* MCP Tool Generator
* Orchestrates the creation and registration of tools from endpoint definitions
*/
export declare class McpToolGenerator {
private registry;
private factory;
constructor(registry?: McpToolRegistry, factory?: McpToolFactory);
/**
* Generate and register all tools for specified controllers
*/
generateTools(config?: ToolGeneratorConfig): Promise<void>;
/**
* Generate tools for a specific controller
*/
generateToolsForController(controller: ControllerType, config?: ToolFactoryConfig): Promise<ToolInfo[]>;
/**
* Generate a single tool for a specific endpoint
*/
generateToolForEndpoint(endpointName: string, config?: ToolFactoryConfig): Promise<ToolInfo | null>;
/**
* Regenerate tools with new configuration
*/
regenerateTools(config?: ToolGeneratorConfig): Promise<void>;
/**
* Get all available controllers
*/
private getAllControllers;
/**
* Get generation statistics
*/
getGenerationStats(): {
availableEndpoints: number;
registeredTools: number;
byController: Record<ControllerType, {
endpoints: number;
tools: number;
}>;
};
/**
* Validate tool generation
*/
validateGeneration(): {
valid: boolean;
errors: string[];
};
/**
* Export tool configuration for debugging
*/
exportToolConfig(): any;
/**
* Get the registry instance
*/
getRegistry(): McpToolRegistry;
/**
* Get the factory instance
*/
getFactory(): McpToolFactory;
}
export declare const mcpToolGenerator: McpToolGenerator;