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
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of tests to retrieve (default: 10) | |
| offset | No | Offset for pagination (default: 0) |
Implementation Reference
- src/handlers/smartDelivery.ts:1002-1041 (handler)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, }; } }
- src/tools/smartDelivery.ts:480-497 (schema)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)', }, }, }, };
- src/handlers/smartDelivery.ts:107-108 (registration)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);
- src/types/smartDelivery.ts:393-395 (schema)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; }
- src/tools/smartDelivery.ts:603-603 (registration)Inclusion of the tool in the smartDeliveryTools export array for registry import and registration.GET_MAILBOX_SUMMARY_TOOL,