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

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'get' operation (implying read-only), but doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the detailed report takes. For a reporting tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 a single, clear sentence that efficiently communicates the core purpose. There's no wasted language or unnecessary elaboration. It's appropriately sized for what it needs to convey and is front-loaded with the essential information.

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?

For a single-parameter read operation with no output schema, the description adequately states what the tool does but leaves important contextual gaps. Without annotations, it should ideally mention that this is a read-only operation and provide some indication of the report format. The presence of many similar report tools in the sibling list suggests more differentiation would be helpful for agent selection.

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

Parameters3/5

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

Schema description coverage is 100% with the single parameter 'spam_test_id' well-described in the schema. The description doesn't add any additional parameter context beyond what's already in the schema (which specifies it's the ID of the spam test to get the report for). With complete schema coverage, the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the action ('Get detailed report') and resource ('spam test sorted by email providers'), making the purpose understandable. It distinguishes from some siblings like 'smartlead_get_spam_test_details' by specifying the provider-wise sorting aspect, but doesn't explicitly differentiate from 'smartlead_get_group_wise_report' or 'smartlead_get_sender_account_wise_report' which might offer similar report types.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There are multiple report-related sibling tools (group-wise, sender account-wise, region-wise providers, etc.), but no indication of when this provider-wise report is appropriate versus those other report types. No prerequisites or exclusions are mentioned.

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