Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_mailbox_summary

Retrieve mailbox performance summaries for Smart Delivery tests, showing overall metrics across all campaigns with configurable pagination.

Instructions

Get the list of mailboxes used for any Smart Delivery test with overall performance across all tests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of tests to retrieve (default: 10)
offsetNoOffset for pagination (default: 0)

Implementation Reference

  • The primary handler function that implements the tool logic: validates input with isMailboxSummaryParams, constructs SmartDelivery API client, performs GET request to `/spam-test/report/mailboxes-summary` with optional limit/offset pagination, returns formatted JSON response or error content.
    async function handleGetMailboxSummary( args: unknown, apiClient: AxiosInstance, withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T> ) { if (!isMailboxSummaryParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for smartlead_get_mailbox_summary' ); } try { const smartDeliveryClient = createSmartDeliveryClient(apiClient); const { limit = 10, offset = 0 } = args; const response = await withRetry( async () => smartDeliveryClient.get(`/spam-test/report/mailboxes-summary?limit=${limit}&offset=${offset}`), 'get mailbox summary' ); 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 metadata and input schema definition, specifying optional integer parameters for limit and offset.
    export const GET_MAILBOX_SUMMARY_TOOL: CategoryTool = { name: 'smartlead_get_mailbox_summary', description: 'Get the list of mailboxes used for any Smart Delivery test with overall performance across all tests.', category: ToolCategory.SMART_DELIVERY, inputSchema: { type: 'object', properties: { limit: { type: 'integer', description: 'Number of tests to retrieve (default: 10)', }, offset: { type: 'integer', description: 'Offset for pagination (default: 0)', }, }, }, };
  • Dispatch case in handleSmartDeliveryTool switch statement that registers and routes the tool name to its handler function.
    case 'smartlead_get_mailbox_summary': { return handleGetMailboxSummary(args, apiClient, withRetry);
  • Type guard for input validation in the handler; accepts any non-null object since parameters are optional.
    export function isMailboxSummaryParams(args: unknown): args is MailboxSummaryParams { return typeof args === 'object' && args !== null; }
  • Inclusion of the tool in the smartDeliveryTools export array for registry import and registration.
    GET_MAILBOX_SUMMARY_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