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,

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