UNPKG

evolution-api-mcp

Version:

MCP Server for Evolution API v2 - Integrate WhatsApp functionality with Claude Desktop and other MCP clients

65 lines (64 loc) 1.58 kB
/** * Chat Controller MCP Tools Implementation * Implements all tools for chat management through Evolution API */ import { ToolInfo } from '../types'; import { EvolutionHttpClient } from '../../clients/evolution-http-client'; /** * Chat Controller tool implementations */ export declare class ChatTools { private httpClient; constructor(httpClient: EvolutionHttpClient); /** * Find messages with filtering and pagination */ createFindMessagesTool(): ToolInfo; private findMessagesHandler; /** * Find contacts */ createFindContactsTool(): ToolInfo; private findContactsHandler; /** * Find chats */ createFindChatsTool(): ToolInfo; private findChatsHandler; /** * Mark messages as read */ createMarkAsReadTool(): ToolInfo; private markAsReadHandler; /** * Archive or unarchive chat */ createArchiveChatTool(): ToolInfo; private archiveChatHandler; /** * Check if numbers have WhatsApp */ createCheckIsWhatsappTool(): ToolInfo; private checkIsWhatsappHandler; /** * Send presence (typing indicators) */ createSendPresenceTool(): ToolInfo; private sendPresenceHandler; /** * Get all chat tools */ getAllTools(): ToolInfo[]; /** * Handle API errors with user-friendly messages */ private handleApiError; /** * Handle unexpected errors */ private handleUnexpectedError; /** * Map HTTP status codes to error types */ private mapStatusToErrorType; }