Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_ip_details

Retrieve IP blacklist details for specific email campaigns to identify deliverability issues and monitor sender reputation.

Instructions

Get the list of all blacklists per IP for a specific email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reply_idYesID of the email received by the seed account
spam_test_idYesID of the spam test

Implementation Reference

  • The core handler function that validates input using isIpDetailsParams, creates a SmartDelivery API client, makes a GET request to retrieve IP details for the specified spam_test_id and reply_id, and returns the JSON response or error.
    async function handleGetIpDetails(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isIpDetailsParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_get_ip_details'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        const { spam_test_id, reply_id } = args;
        
        const response = await withRetry(
          async () => smartDeliveryClient.get(`/spam-test/report/${spam_test_id}/sender-account-wise/${reply_id}/ip-details`),
          'get IP details'
        );
    
        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 schema definition with input validation requiring spam_test_id and reply_id integers.
    export const GET_IP_DETAILS_TOOL: CategoryTool = {
      name: 'smartlead_get_ip_details',
      description: 'Get the list of all blacklists per IP for a specific email.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          spam_test_id: {
            type: 'integer',
            description: 'ID of the spam test',
          },
          reply_id: {
            type: 'integer',
            description: 'ID of the email received by the seed account',
          },
        },
        required: ['spam_test_id', 'reply_id'],
      },
    };
  • src/index.ts:217-219 (registration)
    Registration of all smartDeliveryTools (including smartlead_get_ip_details) to the toolRegistry if smartDelivery category is enabled.
    if (enabledCategories.smartDelivery) {
      toolRegistry.registerMany(smartDeliveryTools);
    }
  • Dispatcher switch case that routes 'smartlead_get_ip_details' calls to the specific handleGetIpDetails function.
    case 'smartlead_get_ip_details': {
      return handleGetIpDetails(args, apiClient, withRetry);
    }
  • src/index.ts:354-355 (registration)
    Main tool call dispatcher in index.ts that routes SMART_DELIVERY category tools to handleSmartDeliveryTool.
    case ToolCategory.SMART_DELIVERY:
      return await handleSmartDeliveryTool(name, toolArgs, apiClient, withRetry);
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