Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_create_automated_placement_test

Create automated email placement tests on a schedule to evaluate deliverability across spam filters, check link domains, and monitor inbox placement using Smart Delivery.

Instructions

Create an automated placement test that runs on a schedule using Smart Delivery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
all_email_sent_without_time_gapYesSet true to send all emails simultaneously
campaign_idYesCampaign ID for which you want to select the sequence to test
daysYesDays of the week to run the test (1-7, where 1 is Monday)
descriptionNoDescription for your test to reference later
every_daysYesFrequency of how often to run a new test
folder_idNoFolder ID to assign the test to
is_warmupYesSet true to receive positive intent responses and move emails from spam to inbox
link_checkerYesEnable to check if domains for links in email body are blacklisted
min_time_btwn_emailsYesTime gap between each email from each mailbox (if time gap enabled)
min_time_unitYesTime unit for the time gap (minutes, hours, days)
provider_idsYesArray of provider IDs to send test emails to
schedule_start_timeYesStart date and time to schedule or run the test (ISO format)
sender_accountsYesArray of email addresses to use as senders
sequence_mapping_idYesThe ID of the sequence or variant you would like to test
spam_filtersYesArray of spam filters to test across, e.g. ["spam_assassin"]
starHourNoTest start time
test_end_dateYesEnd date to stop running your test (YYYY-MM-DD format)
test_nameYesName of your test
tzYesTimezone for scheduling

Implementation Reference

  • The core handler function that validates input parameters using isCreateAutomatedPlacementTestParams, creates a Smart Delivery API client, performs a POST request to '/spam-test/schedule' endpoint with the provided arguments, and returns the formatted response or error.
    async function handleCreateAutomatedPlacementTest(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isCreateAutomatedPlacementTestParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_create_automated_placement_test'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        
        const response = await withRetry(
          async () => smartDeliveryClient.post('/spam-test/schedule', args),
          'create automated placement test'
        );
    
        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,
        };
      }
    }
  • Defines the tool metadata, description, category, and complete inputSchema specifying all parameters, their types, descriptions, and required fields for creating an automated placement test.
    export const CREATE_AUTOMATED_PLACEMENT_TEST_TOOL: CategoryTool = {
      name: 'smartlead_create_automated_placement_test',
      description: 'Create an automated placement test that runs on a schedule using Smart Delivery.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          test_name: {
            type: 'string',
            description: 'Name of your test',
          },
          description: {
            type: 'string',
            description: 'Description for your test to reference later',
          },
          spam_filters: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of spam filters to test across, e.g. ["spam_assassin"]',
          },
          link_checker: {
            type: 'boolean',
            description: 'Enable to check if domains for links in email body are blacklisted',
          },
          campaign_id: {
            type: 'integer',
            description: 'Campaign ID for which you want to select the sequence to test',
          },
          sequence_mapping_id: {
            type: 'integer',
            description: 'The ID of the sequence or variant you would like to test',
          },
          provider_ids: {
            type: 'array',
            items: { type: 'integer' },
            description: 'Array of provider IDs to send test emails to',
          },
          sender_accounts: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of email addresses to use as senders',
          },
          all_email_sent_without_time_gap: {
            type: 'boolean',
            description: 'Set true to send all emails simultaneously',
          },
          min_time_btwn_emails: {
            type: 'integer',
            description: 'Time gap between each email from each mailbox (if time gap enabled)',
          },
          min_time_unit: {
            type: 'string',
            description: 'Time unit for the time gap (minutes, hours, days)',
          },
          is_warmup: {
            type: 'boolean',
            description: 'Set true to receive positive intent responses and move emails from spam to inbox',
          },
          schedule_start_time: {
            type: 'string',
            description: 'Start date and time to schedule or run the test (ISO format)',
          },
          test_end_date: {
            type: 'string',
            description: 'End date to stop running your test (YYYY-MM-DD format)',
          },
          every_days: {
            type: 'integer',
            description: 'Frequency of how often to run a new test',
          },
          tz: {
            type: 'string',
            description: 'Timezone for scheduling',
          },
          days: {
            type: 'array',
            items: { type: 'integer' },
            description: 'Days of the week to run the test (1-7, where 1 is Monday)',
          },
          starHour: {
            type: 'string',
            description: 'Test start time',
          },
          folder_id: {
            type: 'integer',
            description: 'Folder ID to assign the test to',
          },
        },
        required: ['test_name', 'spam_filters', 'link_checker', 'campaign_id', 'sequence_mapping_id', 'provider_ids', 'sender_accounts', 'all_email_sent_without_time_gap', 'min_time_btwn_emails', 'min_time_unit', 'is_warmup', 'schedule_start_time', 'test_end_date', 'every_days', 'tz', 'days'],
      },
    };
  • src/index.ts:217-219 (registration)
    Registers the array of Smart Delivery tools (including smartlead_create_automated_placement_test) with the tool registry if the smartDelivery category is enabled by license.
    if (enabledCategories.smartDelivery) {
      toolRegistry.registerMany(smartDeliveryTools);
    }
  • src/index.ts:354-356 (registration)
    Routes calls to tools in SMART_DELIVERY category (including this tool) to the handleSmartDeliveryTool dispatcher function.
    case ToolCategory.SMART_DELIVERY:
      return await handleSmartDeliveryTool(name, toolArgs, apiClient, withRetry);
    case ToolCategory.WEBHOOKS:
  • Switch case dispatcher within handleSmartDeliveryTool that directs to the specific handler for this tool.
    case 'smartlead_create_automated_placement_test': {
      return handleCreateAutomatedPlacementTest(args, 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