Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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,
        };
      }
    }
  • 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);
    }
  • 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;
    }
  • 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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool retrieves a list, implying a read-only operation, but does not specify whether it requires authentication, has rate limits, returns paginated results, or details the format of the region/country classification. This leaves significant gaps for a tool with potential complexity in data retrieval.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences that are front-loaded with the core purpose and followed by usage context. Every sentence adds value without redundancy, making it efficiently structured and appropriately sized for a zero-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's zero parameters and lack of annotations or output schema, the description covers the purpose and usage context adequately. However, it does not address behavioral aspects like authentication needs or response format, which could be important for an AI agent to invoke it correctly. This results in a minimal viable but incomplete description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, focusing instead on the tool's purpose and usage. This aligns with the baseline expectation for tools without parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieve') and resource ('list of all Email Providers for spam testing classified by region/country'), making the purpose specific. It distinguishes this tool from siblings by focusing on region/country classification of providers, unlike other tools that handle campaigns, leads, or tests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: to obtain provider IDs required for creating manual or automated spam tests. However, it does not explicitly state when not to use it or name specific alternatives among siblings, such as 'smartlead_get_vendors' or 'smartlead_get_provider_wise_report', which might offer overlapping functionality.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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