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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions fetching stats but doesn't specify whether this is a read-only operation, if it requires authentication, rate limits, or what the output format looks like. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key information: action, resource, and time scope. There is no wasted verbiage, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage context, behavioral traits, and output, which are needed for a complete understanding despite the simple structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description implies the 'email_account_id' parameter is needed to specify the account, but adds no meaning beyond the schema's 100% coverage. Since the schema already fully describes the parameter, the baseline score of 3 is appropriate, as the description doesn't enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Fetch warmup stats') and resource ('for a specific email account') with a time constraint ('for the last 7 days'). It distinguishes from siblings by focusing on warmup statistics rather than campaigns, leads, or other metrics, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'smartlead_get_campaign_statistics' or 'smartlead_get_mailbox_summary'. It lacks context about prerequisites, such as whether the email account must be configured for warmup, or exclusions for when other tools might be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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