Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_sender_account_wise_report

Retrieve a detailed spam test report organized by sender accounts, showing individual email performance from each mailbox to analyze deliverability and sender reputation.

Instructions

Get detailed report of a spam test sorted by sender accounts with details of each email from each mailbox.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spam_test_idYesID of the spam test to get the sender account-wise report for

Implementation Reference

  • Core handler function that validates the input using isSenderAccountWiseReportParams, creates a SmartDelivery API client, extracts spam_test_id, performs a GET request to `/spam-test/report/${spam_test_id}/sender-account-wise` with retry logic, and returns the JSON response or an error message.
    async function handleGetSenderAccountWiseReport(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isSenderAccountWiseReportParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_get_sender_account_wise_report'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        const { spam_test_id } = args;
        
        const response = await withRetry(
          async () => smartDeliveryClient.get(`/spam-test/report/${spam_test_id}/sender-account-wise`),
          'get sender account wise report'
        );
    
        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's metadata including name, description, category (SMART_DELIVERY), and input schema requiring a single integer parameter 'spam_test_id'.
    export const GET_SENDER_ACCOUNT_WISE_REPORT_TOOL: CategoryTool = {
      name: 'smartlead_get_sender_account_wise_report',
      description: 'Get detailed report of a spam test sorted by sender accounts with details of each email from each mailbox.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          spam_test_id: {
            type: 'integer',
            description: 'ID of the spam test to get the sender account-wise report for',
          },
        },
        required: ['spam_test_id'],
      },
    };
  • src/index.ts:217-219 (registration)
    Registers the array of all SmartDelivery tools (including this one) to the central ToolRegistry if the smartDelivery category is enabled by license/configuration.
    if (enabledCategories.smartDelivery) {
      toolRegistry.registerMany(smartDeliveryTools);
    }
  • Type guard function to validate input parameters for the tool, ensuring it's an object with a numeric 'spam_test_id' property.
    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'
      );
    }
  • Switch case in handleSmartDeliveryTool that routes calls to this specific tool name to its handler function.
    case 'smartlead_get_sender_account_wise_report': {
      return handleGetSenderAccountWiseReport(args, apiClient, withRetry);
    }
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. It mentions the report is 'detailed' and includes 'details of each email from each mailbox,' but doesn't disclose behavioral traits such as whether it's a read-only operation, potential rate limits, authentication needs, or what the output format looks like (e.g., JSON structure, pagination). This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Get detailed report...'). It avoids redundancy and is appropriately sized for the tool's complexity, though it could be slightly more structured by separating key points.

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 behavioral aspects (e.g., safety, output format) and doesn't compensate for the missing structured data. For a tool that likely returns complex report data, this leaves significant gaps for an AI agent.

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 'spam_test_id' parameter. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline score of 3 for high schema coverage.

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 verb ('Get') and resource ('detailed report of a spam test'), specifying it's 'sorted by sender accounts with details of each email from each mailbox.' This distinguishes it from generic report tools, though it doesn't explicitly differentiate from similar siblings like 'smartlead_get_group_wise_report' or 'smartlead_get_provider_wise_report'.

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, timing, or compare it to sibling tools like 'smartlead_get_spam_test_details' or other report types, leaving the agent to infer usage context.

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