UNPKG

cakemail-mcp-server

Version:

Enterprise MCP server for Cakemail API integration with Claude AI - includes comprehensive template management, list management, sub-account management, BEEeditor visual email design, and advanced analytics

55 lines 1.97 kB
export function formatCampaignResponse(campaign, action = 'retrieved') { return { content: [ { type: 'text', text: `📧 **Campaign ${action} Successfully!**\n\n` + `✅ **Campaign ID:** ${campaign.data.id}\n` + `✅ **Name:** ${campaign.data.name}\n` + `✅ **Subject:** ${campaign.data.subject}\n` + `✅ **Status:** ${campaign.data.status}\n` + `✅ **Created:** ${campaign.data.created_on}\n\n` + `**Full Response:**\n${JSON.stringify(campaign, null, 2)}`, }, ], }; } export function formatSuccessResponse(message, data) { const content = `✅ **${message}**\n\n` + (data ? `**Full Response:**\n${JSON.stringify(data, null, 2)}` : ''); return { content: [ { type: 'text', text: content, }, ], }; } export function formatListResponse(items, title, formatter) { const total = items.length; const displayItems = items.slice(0, 10); return { content: [ { type: 'text', text: `📋 **${title} (${total} total)**\n\n` + `**Showing ${displayItems.length} items:**\n\n` + (displayItems.map(formatter).join('\n\n') || 'No items found.') + (total > 10 ? `\n\n**... and ${total - 10} more items**` : '') + `\n\n**Full Response:**\n${JSON.stringify(items, null, 2)}`, }, ], }; } // Additional formatting utilities for logs and reports export function formatSectionHeader(title) { return `## ${title}`; } export function formatKeyValue(key, value) { return `**${key}:** ${value}`; } export function formatList(items) { return items.map(item => `• ${item}`).join('\n'); } //# sourceMappingURL=formatting.js.map