Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_provider_wise_report

Retrieve a detailed spam test report categorized by email providers to analyze deliverability performance across different email services.

Instructions

Get detailed report of a spam test sorted by email providers.

Input Schema

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

Implementation Reference

  • Core handler function that executes the tool: validates input using isProviderWiseReportParams, calls SmartDelivery API POST /spam-test/report/{spam_test_id}/providerwise, returns formatted JSON response or error message.
    async function handleGetProviderWiseReport( args: unknown, apiClient: AxiosInstance, withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T> ) { if (!isProviderWiseReportParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for smartlead_get_provider_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}/providerwise`), 'get provider 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 definition with input schema: requires spam_test_id (integer). Used for MCP tool registration and validation.
    export const GET_PROVIDER_WISE_REPORT_TOOL: CategoryTool = { name: 'smartlead_get_provider_wise_report', description: 'Get detailed report of a spam test sorted by email providers.', category: ToolCategory.SMART_DELIVERY, inputSchema: { type: 'object', properties: { spam_test_id: { type: 'integer', description: 'ID of the spam test to get the provider-wise report for', }, }, required: ['spam_test_id'], }, };
  • src/index.ts:217-219 (registration)
    Registers the smartDeliveryTools array (including this tool) to the MCP toolRegistry if smartDelivery category enabled by license.
    if (enabledCategories.smartDelivery) { toolRegistry.registerMany(smartDeliveryTools); }
  • src/index.ts:354-355 (registration)
    Top-level tool dispatch in CallToolRequest handler: routes SMART_DELIVERY tools to handleSmartDeliveryTool.
    case ToolCategory.SMART_DELIVERY: return await handleSmartDeliveryTool(name, toolArgs, apiClient, withRetry);
  • Dispatches this specific tool name to the handleGetProviderWiseReport function within handleSmartDeliveryTool switch.
    case 'smartlead_get_provider_wise_report': { return handleGetProviderWiseReport(args, apiClient, withRetry); }
  • Type guard function for input validation: checks for object with spam_test_id as number.
    export function isProviderWiseReportParams(args: unknown): args is ProviderWiseReportParams { return ( typeof args === 'object' && args !== null && 'spam_test_id' in args && typeof (args as ProviderWiseReportParams).spam_test_id === 'number' ); }

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