Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_blacklist

Retrieve blacklist information for email campaigns by providing a spam test ID to identify which IP addresses and emails were flagged.

Instructions

Get the list of all blacklists per IP per email sent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spam_test_idYesID of the spam test to get the blacklist information for

Implementation Reference

  • Core execution logic: validates input params, calls SmartDelivery API `/spam-test/report/${spam_test_id}/blacklist`, returns JSON response or formatted error.
    async function handleGetBlacklist(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isBlacklistParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_get_blacklist'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        const { spam_test_id } = args;
        
        const response = await withRetry(
          async () => smartDeliveryClient.get(`/spam-test/report/${spam_test_id}/blacklist`),
          'get blacklist'
        );
    
        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 metadata and input schema definition (requires spam_test_id). Included in smartDeliveryTools array for registration.
    export const GET_BLACKLIST_TOOL: CategoryTool = {
      name: 'smartlead_get_blacklist',
      description: 'Get the list of all blacklists per IP per email sent.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          spam_test_id: {
            type: 'integer',
            description: 'ID of the spam test to get the blacklist information for',
          },
        },
        required: ['spam_test_id'],
      },
    };
  • Type guard function for validating tool input parameters (object with numeric spam_test_id).
    export function isBlacklistParams(args: unknown): args is BlacklistParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as BlacklistParams).spam_test_id === 'number'
      );
    }
  • src/index.ts:217-219 (registration)
    Registers the smartDeliveryTools array (containing smartlead_get_blacklist) with the MCP tool registry when smartDelivery category is license-enabled.
    if (enabledCategories.smartDelivery) {
      toolRegistry.registerMany(smartDeliveryTools);
    }
  • Dispatches to specific handler within the SmartDelivery tool handler switch statement.
    case 'smartlead_get_blacklist': {
      return handleGetBlacklist(args, apiClient, withRetry);
    }
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 offers minimal behavioral insight. It implies a read operation ('Get') but doesn't disclose permissions, rate limits, data format, or pagination. For a tool with no annotation coverage, this is inadequate.

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 wasted words. It's front-loaded and appropriately sized for its purpose.

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?

Given no annotations and no output schema, the description is incomplete. It lacks details on return format, error handling, and behavioral traits, which are critical for a tool with one required parameter and no structured output documentation.

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 the single parameter. The description adds no additional parameter semantics beyond what's in the schema, resulting in a baseline score of 3.

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 ('Get') and resource ('list of all blacklists per IP per email sent'), making the purpose understandable. It distinguishes from siblings by focusing on blacklist retrieval, though it doesn't explicitly differentiate from other 'get' tools like smartlead_get_spam_test_details.

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. The description doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage solely from the tool name and parameters.

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