Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_list_all_tests

Retrieve all Smart Delivery tests (manual or automated) with pagination controls to manage email marketing campaign testing data.

Instructions

List all Smart Delivery tests, either manual or automated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of tests to retrieve (default: 10)
offsetNoOffset for pagination (default: 0)
testTypeYesType of tests to list (manual or auto)

Implementation Reference

  • The core handler function that validates input parameters using isListAllTestsParams, makes a POST request to the SmartDelivery API endpoint `/spam-test/report?testType=${testType}` with pagination params, and returns the JSON response or formatted error.
    async function handleListAllTests(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isListAllTestsParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_list_all_tests'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        const { testType, limit = 10, offset = 0 } = args;
        
        const response = await withRetry(
          async () => smartDeliveryClient.post(`/spam-test/report?testType=${testType}`, { limit, offset }),
          'list all 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 specifying required 'testType' ('manual' or 'auto') and optional pagination parameters 'limit' and 'offset'.
    export const LIST_ALL_TESTS_TOOL: CategoryTool = {
      name: 'smartlead_list_all_tests',
      description: 'List all Smart Delivery tests, either manual or automated.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          testType: {
            type: 'string',
            enum: ['manual', 'auto'],
            description: 'Type of tests to list (manual or auto)',
          },
          limit: {
            type: 'integer',
            description: 'Number of tests to retrieve (default: 10)',
          },
          offset: {
            type: 'integer',
            description: 'Offset for pagination (default: 0)',
          },
        },
        required: ['testType'],
      },
    };
  • src/index.ts:216-219 (registration)
    Registers the smartDeliveryTools array (including smartlead_list_all_tests schema) to the MCP toolRegistry if the smartDelivery category is enabled by license.
    // Register smart delivery tools if enabled
    if (enabledCategories.smartDelivery) {
      toolRegistry.registerMany(smartDeliveryTools);
    }
  • src/index.ts:354-356 (registration)
    In the main CallToolRequest handler, routes all SMART_DELIVERY category tools (including smartlead_list_all_tests) to handleSmartDeliveryTool for execution.
    case ToolCategory.SMART_DELIVERY:
      return await handleSmartDeliveryTool(name, toolArgs, apiClient, withRetry);
    case ToolCategory.WEBHOOKS:
  • Within handleSmartDeliveryTool switch statement, specifically routes 'smartlead_list_all_tests' calls to the handleListAllTests implementation.
    }
    case 'smartlead_get_provider_wise_report': {
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it lists tests without disclosing behavioral traits. It doesn't mention pagination behavior (implied by limit/offset), rate limits, authentication needs, or whether it's a read-only operation, which is critical for a list tool with parameters.

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 with zero waste. It's front-loaded with the core purpose and includes essential scope details ('manual or automated'), making it appropriately sized and structured.

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 no annotations and no output schema, the description is minimal but covers the basic purpose. However, for a tool with 3 parameters and list functionality, it lacks details on return format, pagination behavior, or error handling, making it adequate but with clear gaps.

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%, so the schema fully documents parameters (limit, offset, testType). The description adds no additional meaning beyond implying testType filtering, matching the baseline score when schema does the heavy lifting.

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 ('List') and resource ('all Smart Delivery tests'), specifying they can be 'manual or automated'. It distinguishes from siblings like smartlead_get_spam_test_details by focusing on listing rather than detailed retrieval, though it doesn't explicitly contrast with all similar tools like smartlead_list_campaigns.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or compare with sibling tools like smartlead_get_spam_test_details for detailed test information or smartlead_list_campaigns for other list operations, leaving usage ambiguous.

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