Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_sender_accounts

Retrieve all sender accounts configured for a specific spam test to analyze email deliverability and sender reputation.

Instructions

Get the list of all sender accounts selected for a specific spam test.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spam_test_idYesID of the spam test to get the sender accounts for

Implementation Reference

  • Main handler function that validates arguments using isSenderAccountsParams, creates a SmartDelivery API client, performs a GET request to retrieve sender accounts for the given spam_test_id, and returns the formatted JSON response or error.
    async function handleGetSenderAccounts(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isSenderAccountsParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_get_sender_accounts'
        );
      }
    
      try {
        const smartDeliveryClient = createSmartDeliveryClient(apiClient);
        const { spam_test_id } = args;
        
        const response = await withRetry(
          async () => smartDeliveryClient.get(`/spam-test/report/${spam_test_id}/sender-accounts`),
          'get sender accounts'
        );
    
        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 (SMART_DELIVERY), and input schema requiring 'spam_test_id' as integer.
    export const GET_SENDER_ACCOUNTS_TOOL: CategoryTool = {
      name: 'smartlead_get_sender_accounts',
      description: 'Get the list of all sender accounts selected for a specific spam test.',
      category: ToolCategory.SMART_DELIVERY,
      inputSchema: {
        type: 'object',
        properties: {
          spam_test_id: {
            type: 'integer',
            description: 'ID of the spam test to get the sender accounts for',
          },
        },
        required: ['spam_test_id'],
      },
    };
  • src/index.ts:217-219 (registration)
    Registers the array of smartDeliveryTools (which includes smartlead_get_sender_accounts) to the tool registry if smartDelivery category is enabled.
    if (enabledCategories.smartDelivery) {
      toolRegistry.registerMany(smartDeliveryTools);
    }
  • Type guard function for validating input parameters matching SenderAccountsParams interface (spam_test_id: number).
    export function isSenderAccountsParams(args: unknown): args is SenderAccountsParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'spam_test_id' in args &&
        typeof (args as SenderAccountsParams).spam_test_id === 'number'
      );
    }
  • Switch case in handleSmartDeliveryTool that routes the tool call to the specific handleGetSenderAccounts implementation.
    case 'smartlead_get_sender_accounts': {
      return handleGetSenderAccounts(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 states it 'Get[s] the list', implying a read-only operation, but doesn't disclose behavioral traits such as authentication requirements, rate limits, pagination, error handling, or what 'selected' means in context. This leaves significant gaps 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.

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 front-loaded with the core action and resource, 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 no annotations and no output schema, the description is incomplete. It lacks details on return values (e.g., format of the list, what data sender accounts include), error conditions, or operational context. For a tool in a complex domain with many siblings, this minimal description leaves too much unspecified.

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 parameter 'spam_test_id' clearly documented in the schema. The description adds no additional parameter semantics beyond implying the tool is for a 'specific spam test', which aligns with the schema. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 the resource 'list of all sender accounts', specifying it's for a 'specific spam test'. It distinguishes from siblings like 'smartlead_get_spam_test_details' by focusing on sender accounts rather than test details, though it doesn't explicitly contrast with all related tools.

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 on when to use this tool versus alternatives is provided. It doesn't mention prerequisites (e.g., needing an existing spam test ID), exclusions, or comparisons to siblings like 'smartlead_get_sender_account_wise_report' or 'smartlead_get_spam_test_details', leaving usage context 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