Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_delete_smart_delivery_tests

Remove multiple Smart Delivery spam tests in bulk by specifying their IDs to clean up test data and manage email marketing campaigns.

Instructions

Delete multiple Smart Delivery tests in bulk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spamTestIdsYesArray of spam test IDs to delete

Implementation Reference

  • The main handler function for the tool. Validates input parameters using isDeleteSmartDeliveryTestsParams, makes a POST request to the Smart Delivery API endpoint '/spam-test/delete', and returns the JSON response or an error message.
    async function handleDeleteSmartDeliveryTests(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isDeleteSmartDeliveryTestsParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_delete_smart_delivery_tests'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        
        const response = await withRetry(
          async () => smartDeliveryClient.post('/spam-test/delete', args),
          'delete smart delivery tests'
        );
    
        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 including name, description, category, and input schema requiring spamTestIds as an array of integers.
    export const DELETE_SMART_DELIVERY_TESTS_TOOL: CategoryTool = {
      name: 'smartlead_delete_smart_delivery_tests',
      description: 'Delete multiple Smart Delivery tests in bulk.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          spamTestIds: {
            type: 'array',
            items: { type: 'integer' },
            description: 'Array of spam test IDs to delete',
          },
        },
        required: ['spamTestIds'],
      },
    };
  • Type guard (validator) function that checks if input args conform to the DeleteSmartDeliveryTestsParams interface (object with spamTestIds: number[]). Used in the handler for input validation.
    export function isDeleteSmartDeliveryTestsParams(args: unknown): args is DeleteSmartDeliveryTestsParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spamTestIds' in args &&
        Array.isArray((args as DeleteSmartDeliveryTestsParams).spamTestIds) &&
        (args as DeleteSmartDeliveryTestsParams).spamTestIds.every(id => typeof id === 'number')
      );
    }
  • src/index.ts:217-219 (registration)
    Registers the array of smartDeliveryTools (including this tool) with the toolRegistry when the smartDelivery category is enabled by license/feature flags.
    if (enabledCategories.smartDelivery) {
      toolRegistry.registerMany(smartDeliveryTools);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. While 'Delete' implies a destructive mutation, it doesn't disclose critical behavioral traits: whether deletions are permanent/reversible, what permissions are required, if there are rate limits for bulk operations, or what happens to associated data. The description adds minimal context beyond the basic action.

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 immediately conveys the core functionality without any wasted words. It's appropriately sized for a simple deletion tool and front-loads the essential information.

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

Completeness2/5

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

For a destructive bulk deletion tool with no annotations and no output schema, the description is insufficient. It doesn't explain what constitutes a 'Smart Delivery test', what the consequences of deletion are, whether there are confirmation steps, or what the response looks like. Given the complexity and risk of bulk operations, more contextual information is needed.

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?

Schema description coverage is 100%, with the single parameter 'spamTestIds' clearly documented as 'Array of spam test IDs to delete'. The description adds no additional parameter semantics beyond what the schema provides, but since schema coverage is complete, the baseline score of 3 is appropriate.

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 ('Delete') and resource ('multiple Smart Delivery tests in bulk'), which is specific and actionable. However, it doesn't differentiate this tool from sibling deletion tools like 'smartlead_delete_campaign' or 'smartlead_delete_folder', leaving some ambiguity about when to choose this specific deletion tool.

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. With many sibling deletion tools available (e.g., delete_campaign, delete_folder, delete_lead), there's no indication whether this is for cleanup, error correction, or specific workflow steps, nor any prerequisites or exclusions mentioned.

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