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,
    ];
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the report is 'detailed' and 'sorted by location', but doesn't disclose output format, pagination, rate limits, permissions needed, or whether it's a read-only operation. This is inadequate for a tool with no annotation coverage.

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, efficient sentence that front-loads the core purpose ('Get detailed report') with essential qualifiers ('sorted by location'). There is no wasted verbiage or redundancy, making it highly concise and well-structured.

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 simple input schema (1 parameter, 100% coverage) and no output schema, the description is minimally adequate but lacks depth. It doesn't explain what 'detailed report' entails, return format, or error conditions. For a reporting tool with no annotations, more behavioral context would improve completeness.

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% for the single parameter 'spam_test_id', so the schema fully documents it. The description adds no additional parameter context beyond implying the report is for a specific spam test, which is already clear from the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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'), specifying it's sorted by location (region/country). It distinguishes from siblings like 'smartlead_get_provider_wise_report' and 'smartlead_get_sender_account_wise_report' by focusing on location-based grouping, but doesn't explicitly contrast them.

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?

No guidance on when to use this tool versus alternatives is provided. The description mentions 'sorted by location' but doesn't explain scenarios where location-based reporting is preferred over provider-wise or sender account-wise reports from sibling tools, leaving usage context implicit.

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