Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_warmup_stats_by_email

Retrieve warmup statistics for the last 7 days to monitor email account performance and deliverability metrics.

Instructions

Fetch warmup stats for the last 7 days for a specific email account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_account_idYesID of the email account to fetch warmup stats for

Implementation Reference

  • Core handler function that performs input validation, API request to retrieve warmup statistics for the specified email account ID, handles errors, and formats the response as MCP content.
    async function handleWarmupStatsByEmail( args: unknown, apiClient: AxiosInstance, withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T> ) { if (!isWarmupStatsByEmailParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for smartlead_get_warmup_stats_by_email' ); } const { email_account_id } = args; try { const response = await withRetry( async () => apiClient.get(`/email-accounts/${email_account_id}/warmup-stats`), 'get warmup stats by email' ); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], isError: false, }; } catch (error: any) { return { content: [{ type: 'text', text: `API Error: ${error.response?.data?.message || error.message}` }], isError: true, }; } }
  • Tool definition including name, description, category, and JSON input schema for MCP tool registration.
    export const WARMUP_STATS_BY_EMAIL_TOOL: CategoryTool = { name: 'smartlead_get_warmup_stats_by_email', description: 'Fetch warmup stats for the last 7 days for a specific email account.', category: ToolCategory.CAMPAIGN_STATISTICS, inputSchema: { type: 'object', properties: { email_account_id: { type: 'number', description: 'ID of the email account to fetch warmup stats for', }, }, required: ['email_account_id'], }, };
  • Switch case registration that routes calls to this specific tool name to the handleWarmupStatsByEmail handler function.
    case 'smartlead_get_warmup_stats_by_email': { return handleWarmupStatsByEmail(args, apiClient, withRetry); }
  • Runtime type guard/validator for input parameters matching WarmupStatsByEmailParams interface.
    export function isWarmupStatsByEmailParams(args: unknown): args is WarmupStatsByEmailParams { if (typeof args !== 'object' || args === null) { return false; } const params = args as WarmupStatsByEmailParams; return typeof params.email_account_id === 'number'; }
  • src/index.ts:212-214 (registration)
    Registers the array of statistics tools (including this one) to the tool registry if category is enabled.
    if (enabledCategories.campaignStatistics) { toolRegistry.registerMany(statisticsTools); }

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonathan-politzki/smartlead-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server