Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_rdns_details

Verify reverse DNS (rDNS) configuration for email-sending IP addresses to ensure proper email authentication and deliverability.

Instructions

Check if rDNS was correct for an IP sending the email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spam_test_idYesID of the spam test to get the rDNS details for

Implementation Reference

  • The core handler function that validates input using isRdnsDetailsParams, creates a SmartDelivery API client, fetches rDNS details from `/spam-test/report/${spam_test_id}/rdns-details`, and returns the JSON response or formatted error.
    async function handleGetRdnsDetails(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isRdnsDetailsParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_get_rdns_details'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        const { spam_test_id } = args;
        
        const response = await withRetry(
          async () => smartDeliveryClient.get(`/spam-test/report/${spam_test_id}/rdns-details`),
          'get rDNS 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 definition including name, description, category, and input schema requiring 'spam_test_id' as integer. This object is exported and included in smartDeliveryTools array for registration.
    export const GET_RDNS_DETAILS_TOOL: CategoryTool = {
      name: 'smartlead_get_rdns_details',
      description: 'Check if rDNS was correct for an IP sending the email.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          spam_test_id: {
            type: 'integer',
            description: 'ID of the spam test to get the rDNS details for',
          },
        },
        required: ['spam_test_id'],
      },
    };
  • TypeScript interface and type guard function for validating tool input parameters, ensuring 'spam_test_id' is a number.
    // rDNS report types
    export interface RdnsDetailsParams {
      spam_test_id: number;
    }
    
    // Sender Account list types
    export interface SenderAccountsParams {
      spam_test_id: number;
    }
    
    // Blacklists types
    export interface BlacklistParams {
      spam_test_id: number;
    }
    
    // Spam test email content types
    export interface EmailContentParams {
      spam_test_id: number;
    }
    
    // Spam test IP blacklist count types
    export interface IpAnalyticsParams {
      spam_test_id: number;
    }
    
    // Email reply headers types
    export interface EmailHeadersParams {
      spam_test_id: number;
      reply_id: number;
    }
    
    // Schedule history for automated tests types
    export interface ScheduleHistoryParams {
      spam_test_id: number;
    }
    
    // IP details types
    export interface IpDetailsParams {
      spam_test_id: number;
      reply_id: number;
    }
    
    // Mailbox summary types
    export interface MailboxSummaryParams {
      limit?: number;
      offset?: number;
    }
    
    // Mailbox count API types
    export interface MailboxCountParams {
      // This endpoint doesn't require any specific parameters
    }
    
    // Get all folders types
    export interface GetAllFoldersParams {
      limit?: number;
      offset?: number;
      name?: string;
    }
    
    // Create folders types
    export interface CreateFolderParams {
      name: string;
    }
    
    // Get folder by ID types
    export interface GetFolderByIdParams {
      folder_id: number;
    }
    
    // Delete folder types
    export interface DeleteFolderParams {
      folder_id: number;
    }
    
    // Tool parameter interfaces
    export interface GetRegionWiseProvidersParams {
      // This endpoint doesn't require any specific parameters beyond the API key
      // which is handled at the API client level
    }
    
    // Type guards
    export function isGetRegionWiseProvidersParams(args: unknown): args is GetRegionWiseProvidersParams {
      // Since this tool doesn't require specific parameters, any object is valid
      return typeof args === 'object' && args !== null;
    }
    
    export function isCreateManualPlacementTestParams(args: unknown): args is CreateManualPlacementTestParams {
      if (typeof args !== 'object' || args === null) return false;
      
      const params = args as Partial<CreateManualPlacementTestParams>;
      
      return (
        typeof params.test_name === 'string' &&
        Array.isArray(params.spam_filters) &&
        typeof params.link_checker === 'boolean' &&
        typeof params.campaign_id === 'number' &&
        typeof params.sequence_mapping_id === 'number' &&
        Array.isArray(params.provider_ids) &&
        Array.isArray(params.sender_accounts) &&
        typeof params.all_email_sent_without_time_gap === 'boolean' &&
        typeof params.min_time_btwn_emails === 'number' &&
        typeof params.min_time_unit === 'string' &&
        typeof params.is_warmup === 'boolean'
      );
    }
    
    export function isCreateAutomatedPlacementTestParams(args: unknown): args is CreateAutomatedPlacementTestParams {
      if (!isCreateManualPlacementTestParams(args)) return false;
      
      const params = args as Partial<CreateAutomatedPlacementTestParams>;
      
      return (
        typeof params.schedule_start_time === 'string' &&
        typeof params.test_end_date === 'string' &&
        typeof params.every_days === 'number' &&
        typeof params.tz === 'string' &&
        Array.isArray(params.days)
      );
    }
    
    export function isGetSpamTestDetailsParams(args: unknown): args is GetSpamTestDetailsParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as GetSpamTestDetailsParams).spam_test_id === 'number'
      );
    }
    
    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')
      );
    }
    
    export function isStopAutomatedTestParams(args: unknown): args is StopAutomatedTestParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as StopAutomatedTestParams).spam_test_id === 'number'
      );
    }
    
    export function isListAllTestsParams(args: unknown): args is ListAllTestsParams {
      if (typeof args !== 'object' || args === null) return false;
      
      const params = args as Partial<ListAllTestsParams>;
      
      return (
        params.testType === 'manual' || params.testType === 'auto'
      );
    }
    
    export function isProviderWiseReportParams(args: unknown): args is ProviderWiseReportParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as ProviderWiseReportParams).spam_test_id === 'number'
      );
    }
    
    export function isGroupWiseReportParams(args: unknown): args is GroupWiseReportParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as GroupWiseReportParams).spam_test_id === 'number'
      );
    }
    
    export function isSenderAccountWiseReportParams(args: unknown): args is SenderAccountWiseReportParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as SenderAccountWiseReportParams).spam_test_id === 'number'
      );
    }
    
    export function isSpamFilterDetailsParams(args: unknown): args is SpamFilterDetailsParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as SpamFilterDetailsParams).spam_test_id === 'number'
      );
    }
    
    export function isDkimDetailsParams(args: unknown): args is DkimDetailsParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as DkimDetailsParams).spam_test_id === 'number'
      );
    }
    
    export function isSpfDetailsParams(args: unknown): args is SpfDetailsParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as SpfDetailsParams).spam_test_id === 'number'
      );
    }
    
    export function isRdnsDetailsParams(args: unknown): args is RdnsDetailsParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as RdnsDetailsParams).spam_test_id === 'number'
      );
    }
  • Switch case in handleSmartDeliveryTool that dispatches the tool call to the specific handler function.
    case 'smartlead_get_rdns_details': {
      return handleGetRdnsDetails(args, apiClient, withRetry);
    }
  • Inclusion of the tool in the exported smartDeliveryTools array, likely used for MCP tool registration.
    GET_RDNS_DETAILS_TOOL,
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Check') but doesn't reveal whether this is a read-only operation, if it requires specific permissions, what the output format might be, or any rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'correct' rDNS means, what the tool returns (e.g., a boolean, details, or error messages), or how it integrates with the broader email testing context implied by the 'spam_test_id'. For a tool in a complex domain with no structured support, more context 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?

The input schema has 100% description coverage, clearly documenting the single required parameter 'spam_test_id'. The description doesn't add any extra meaning beyond what the schema provides, such as explaining what a 'spam_test_id' represents or its format. Given the high schema coverage, a 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 ('Check') and the resource ('rDNS for an IP sending the email'), making the purpose understandable. However, it doesn't explicitly differentiate this from sibling tools like 'smartlead_get_dkim_details' or 'smartlead_get_spf_details', which also retrieve email authentication details, leaving some ambiguity about when to choose this specific 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, such as other email authentication check tools in the sibling list. It mentions the context ('for an IP sending the email') but lacks explicit when/when-not instructions or named alternatives, leaving usage unclear.

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