Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_group_wise_report

Retrieve a detailed spam test report organized by geographic location to analyze email deliverability performance across different regions and countries.

Instructions

Get detailed report of a spam test sorted by location (region/country).

Input Schema

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

Implementation Reference

  • The core handler function that validates input parameters using isGroupWiseReportParams and makes a POST request to the SmartDelivery API endpoint `/spam-test/report/${spam_test_id}/groupwise` to fetch the group-wise report. Handles errors and formats the response.
    async function handleGetGroupWiseReport( args: unknown, apiClient: AxiosInstance, withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T> ) { if (!isGroupWiseReportParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for smartlead_get_group_wise_report' ); } try { const smartDeliveryClient = createSmartDeliveryClient(apiClient); const { spam_test_id } = args; const response = await withRetry( async () => smartDeliveryClient.post(`/spam-test/report/${spam_test_id}/groupwise`), 'get group 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, }; } }
  • Tool metadata including name, description, category, and input schema definition (requires spam_test_id). This is used for MCP tool registration and input validation.
    export const GET_GROUP_WISE_REPORT_TOOL: CategoryTool = { name: 'smartlead_get_group_wise_report', description: 'Get detailed report of a spam test sorted by location (region/country).', category: ToolCategory.SMART_DELIVERY, inputSchema: { type: 'object', properties: { spam_test_id: { type: 'integer', description: 'ID of the spam test to get the group-wise report for', }, }, required: ['spam_test_id'], }, };
  • Registration of the tool in the main SmartDelivery tool dispatcher switch statement, routing to the specific handler function.
    case 'smartlead_get_group_wise_report': { return handleGetGroupWiseReport(args, apiClient, withRetry); }
  • The tool is included in the smartDeliveryTools array for batch registration in the 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, ];

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