Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_spf_details

Check SPF authentication status for email spam tests to verify sender legitimacy and improve email deliverability.

Instructions

Check if SPF authentication passed or failed for the test.

Input Schema

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

Implementation Reference

  • Core execution logic for the 'smartlead_get_spf_details' tool. Validates input parameters using isSpfDetailsParams, calls the Smart Delivery API endpoint `/spam-test/report/${spam_test_id}/spf-details`, and returns the JSON-formatted response or an error message.
    async function handleGetSpfDetails(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isSpfDetailsParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_get_spf_details'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        const { spam_test_id } = args;
        
        const response = await withRetry(
          async () => smartDeliveryClient.get(`/spam-test/report/${spam_test_id}/spf-details`),
          'get SPF 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,
        };
      }
    }
  • MCP tool definition including the name, description, category, and input schema requiring a 'spam_test_id' integer parameter.
    export const GET_SPF_DETAILS_TOOL: CategoryTool = {
      name: 'smartlead_get_spf_details',
      description: 'Check if SPF authentication passed or failed for the test.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          spam_test_id: {
            type: 'integer',
            description: 'ID of the spam test to get the SPF details for',
          },
        },
        required: ['spam_test_id'],
      },
    };
  • Registration of the 'smartlead_get_spf_details' tool (as GET_SPF_DETAILS_TOOL) in the array of Smart Delivery tools for MCP registry.
    export const smartDeliveryTools = [
      GET_REGION_WISE_PROVIDERS_TOOL,
      CREATE_MANUAL_PLACEMENT_TEST_TOOL,
      CREATE_AUTOMATED_PLACEMENT_TEST_TOOL,
      GET_SPAM_TEST_DETAILS_TOOL,
      DELETE_SMART_DELIVERY_TESTS_TOOL,
      STOP_AUTOMATED_TEST_TOOL,
      LIST_ALL_TESTS_TOOL,
      GET_PROVIDER_WISE_REPORT_TOOL,
      GET_GROUP_WISE_REPORT_TOOL,
      GET_SENDER_ACCOUNT_WISE_REPORT_TOOL,
      GET_SPAM_FILTER_DETAILS_TOOL,
      GET_DKIM_DETAILS_TOOL,
      GET_SPF_DETAILS_TOOL,
      GET_RDNS_DETAILS_TOOL,
      GET_SENDER_ACCOUNTS_TOOL,
      GET_BLACKLIST_TOOL,
      GET_EMAIL_CONTENT_TOOL,
      GET_IP_ANALYTICS_TOOL,
      GET_EMAIL_HEADERS_TOOL,
      GET_SCHEDULE_HISTORY_TOOL,
      GET_IP_DETAILS_TOOL,
      GET_MAILBOX_SUMMARY_TOOL,
      GET_MAILBOX_COUNT_TOOL,
      GET_ALL_FOLDERS_TOOL,
      CREATE_FOLDER_TOOL,
      GET_FOLDER_BY_ID_TOOL,
      DELETE_FOLDER_TOOL,
    ];
  • Runtime type guard function isSpfDetailsParams for validating tool input parameters, ensuring 'spam_test_id' is a 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'
      );
    }
  • TypeScript interface defining the expected parameters for the SPF details tool.
    export interface SpfDetailsParams {
      spam_test_id: number;
    }
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 for behavioral disclosure. It states the tool checks SPF authentication status but doesn't describe what the output looks like (e.g., pass/fail result, detailed report, error handling), whether it's a read-only operation, or any performance/rate limit considerations. For a diagnostic tool with no 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, clear sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple diagnostic tool and front-loads the essential information. Every word earns its place.

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 that this is a diagnostic tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (just pass/fail? detailed analysis?), how results should be interpreted, or what context the spam_test_id should come from. For a tool that presumably provides important authentication status information, more context about outputs and usage would be helpful.

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 'spam_test_id' clearly documented in the schema as 'ID of the spam test to get the SPF details for'. The description doesn't add any parameter-specific information beyond what the schema provides (e.g., format examples, where to obtain this ID). With high schema coverage, 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 tool's purpose: 'Check if SPF authentication passed or failed for the test.' It specifies the action ('Check'), the resource ('SPF authentication'), and the outcome focus ('passed or failed'). However, it doesn't explicitly differentiate from sibling tools like 'smartlead_get_dkim_details' or 'smartlead_get_spam_filter_details', which appear to be related authentication/spam checking tools in the same domain.

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. There's no mention of prerequisites (e.g., needing a spam test ID first), when this check is appropriate, or what other tools might be used for related purposes (like checking DKIM or spam filters). The agent must infer usage from the tool name and description alone.

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