smartlead_get_region_wise_providers
Retrieve email providers classified by region for spam testing. These provider IDs are required to create manual or automated spam tests.
Instructions
Retrieve the list of all Email Providers for spam testing classified by region/country. These provider IDs are required to create manual or automated spam tests.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/smartDelivery.ts:145-183 (handler)Executes the tool logic: validates parameters using isGetRegionWiseProvidersParams, creates a SmartDelivery API client, GET requests '/spam-test/seed/providers', formats and returns the JSON response or error.async function handleGetRegionWiseProviders( args: unknown, apiClient: AxiosInstance, withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T> ) { if (!isGetRegionWiseProvidersParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for smartlead_get_region_wise_providers' ); } try { const smartDeliveryClient = createSmartDeliveryClient(apiClient); const response = await withRetry( async () => smartDeliveryClient.get('/spam-test/seed/providers'), 'get region wise providers' ); 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:5-17 (schema)Defines the tool metadata including name, description, category, and empty inputSchema (no parameters required). Exported as part of smartDeliveryTools array for registration.export const GET_REGION_WISE_PROVIDERS_TOOL: CategoryTool = { name: 'smartlead_get_region_wise_providers', description: 'Retrieve the list of all Email Providers for spam testing classified by region/country. These provider IDs are required to create manual or automated spam tests.', category: ToolCategory.SMART_DELIVERY, inputSchema: { type: 'object', properties: { // This endpoint doesn't require any specific parameters beyond the API key // which is handled at the API client level }, required: [], }, };
- src/index.ts:217-219 (registration)Registers the smartDeliveryTools array (including this tool) to the toolRegistry if smartDelivery category is enabled by license/features.if (enabledCategories.smartDelivery) { toolRegistry.registerMany(smartDeliveryTools); }
- src/types/smartDelivery.ts:180-189 (schema)TypeScript interface and type guard (validator) for input parameters. Accepts any non-null object matching the empty schema.export interface GetRegionWiseProvidersParams { // This endpoint doesn't require any specific parameters beyond the API key // which is handled at the API client level } // Type guards export function isGetRegionWiseProvidersParams(args: unknown): args is GetRegionWiseProvidersParams { // Since this tool doesn't require specific parameters, any object is valid return typeof args === 'object' && args !== null; }
- src/handlers/smartDelivery.ts:44-46 (handler)Switch case in main handleSmartDeliveryTool function that dispatches to the specific handler based on tool name.case 'smartlead_get_region_wise_providers': { return handleGetRegionWiseProviders(args, apiClient, withRetry); }