Skip to main content
Glama
Meerkats-Ai

NeverBounce MCP Server

by Meerkats-Ai

neverbounce_validate_email

Validate email addresses to check deliverability and prevent bounce rates. This tool verifies if an email is valid and safe to send messages to.

Instructions

Validate an email address to check if it's valid and deliverable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesThe email address to validate
timeoutNoTimeout in milliseconds (optional, default: 30000)

Implementation Reference

  • Handler logic for the neverbounce_validate_email tool: validates params, makes API call to NeverBounce with retry, interprets result, and returns formatted response or error.
    case 'neverbounce_validate_email': {
      if (!isValidateEmailParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for neverbounce_validate_email. You must provide an email address.'
        );
      }
    
      try {
        // URL encode the email address
        const encodedEmail = encodeURIComponent(args.email);
        
        const response = await withRetry(
          async () => apiClient.get(`/single/check?key=${NEVERBOUNCE_API_KEY}&email=${encodedEmail}&timeout=${args.timeout || 30000}`),
          'validate email'
        );
        
        const data = response.data;
        
        // Format the response for better readability
        const formattedResponse = {
          email: args.email,
          status: data.status,
          result: interpretVerificationResult(data.result),
          result_code: data.result,
          flags: data.flags || [],
          suggested_correction: data.suggested_correction || null,
          execution_time: data.execution_time
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(formattedResponse, null, 2),
            },
          ],
          isError: false,
        };
      } catch (error) {
        const errorMessage = axios.isAxiosError(error)
          ? `API Error: ${error.response?.data?.message || error.message}`
          : `Error: ${error instanceof Error ? error.message : String(error)}`;
    
        return {
          content: [{ type: 'text', text: errorMessage }],
          isError: true,
        };
      }
    }
  • Tool definition including name, description, and input schema for neverbounce_validate_email.
    const VALIDATE_EMAIL_TOOL: Tool = {
      name: 'neverbounce_validate_email',
      description: 'Validate an email address to check if it\'s valid and deliverable.',
      inputSchema: {
        type: 'object',
        properties: {
          email: {
            type: 'string',
            description: 'The email address to validate',
          },
          timeout: {
            type: 'number',
            description: 'Timeout in milliseconds (optional, default: 30000)',
          }
        },
        required: ['email'],
      },
    };
  • src/index.ts:190-194 (registration)
    Registration of the tool in the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        VALIDATE_EMAIL_TOOL,
      ],
    }));
  • Type guard function to validate input parameters for the tool.
    function isValidateEmailParams(args: unknown): args is ValidateEmailParams {
      if (
        typeof args !== 'object' ||
        args === null ||
        !('email' in args) ||
        typeof (args as { email: unknown }).email !== 'string'
      ) {
        return false;
      }
    
      // Optional parameters
      if (
        'timeout' in args &&
        (args as { timeout: unknown }).timeout !== undefined &&
        typeof (args as { timeout: unknown }).timeout !== 'number'
      ) {
        return false;
      }
    
      return true;
    }
  • Helper function to interpret NeverBounce verification result codes into human-readable strings.
    function interpretVerificationResult(result: number): string {
      switch (result) {
        case 0:
          return 'Valid';
        case 1:
          return 'Invalid';
        case 2:
          return 'Disposable';
        case 3:
          return 'Catchall';
        case 4:
          return 'Unknown';
        default:
          return 'Unknown';
      }
    }
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 validation but does not describe how the validation works (e.g., API call, rate limits, authentication needs, error handling, or what 'deliverable' entails). This leaves significant gaps in understanding the tool's behavior and constraints.

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

Conciseness4/5

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

The description is a single, clear sentence that efficiently states the tool's purpose without unnecessary details. It is front-loaded and wastes no words, though it could be slightly more informative without losing conciseness.

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

Completeness2/5

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

Given no annotations, no output schema, and a simple input schema, the description is incomplete. It lacks details on behavioral traits (e.g., how validation is performed, error responses), and with no output schema, it does not explain return values or result formats. This leaves the agent with insufficient context for effective use.

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 both parameters ('email' and 'timeout') fully documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or validation criteria. The baseline score of 3 reflects adequate coverage by the schema alone.

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 tool's purpose: 'Validate an email address to check if it's valid and deliverable.' It specifies the verb ('validate') and resource ('email address'), and distinguishes it from other validation types by mentioning both validity and deliverability. However, with no sibling tools provided, it cannot demonstrate explicit differentiation from alternatives.

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, prerequisites, or exclusions. It simply states what the tool does without context for application. With no sibling tools mentioned, there is no comparison to other options, leaving the agent without usage direction.

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/Meerkats-Ai/neverbounce-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server