Skip to main content
Glama
Meerkats-Ai

Hunter.io MCP Server

by Meerkats-Ai

hunter_email_count

Retrieve the total number of email addresses associated with a specific domain or company using Hunter.io MCP Server. Quickly assess available contact data for outreach or verification purposes.

Instructions

Know how many email addresses we have for a domain or a company.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyNoThe company name to get the count for (alternative to domain)
domainNoThe domain name to get the count for, e.g. "stripe.com"

Implementation Reference

  • The handler for the 'hunter_email_count' tool. Validates input parameters using isEmailCountParams, calls the Hunter.io /email-count API endpoint with retry logic via withRetry, and returns the response or error.
    case 'hunter_email_count': {
      if (!isEmailCountParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for hunter_email_count'
        );
      }
    
      try {
        // Hunter.io API expects query parameters for email count
        const response = await withRetry(
          async () => apiClient.get('/email-count', { params: args }),
          'email count'
        );
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, 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 for 'hunter_email_count' including name, description, and input schema (domain or company as optional strings).
    const EMAIL_COUNT_TOOL: Tool = {
      name: 'hunter_email_count',
      description: 'Know how many email addresses we have for a domain or a company.',
      inputSchema: {
        type: 'object',
        properties: {
          domain: {
            type: 'string',
            description: 'The domain name to get the count for, e.g. "stripe.com"',
          },
          company: {
            type: 'string',
            description: 'The company name to get the count for (alternative to domain)',
          }
        },
        required: [],
      },
    };
  • src/index.ts:424-432 (registration)
    Registers the 'hunter_email_count' tool (via EMAIL_COUNT_TOOL) in the ListToolsRequest handler response.
      tools: [
        FIND_EMAIL_TOOL,
        VERIFY_EMAIL_TOOL,
        DOMAIN_SEARCH_TOOL,
        EMAIL_COUNT_TOOL,
        ACCOUNT_INFO_TOOL,
      ],
    }));
  • Type guard function that validates the input arguments for the 'hunter_email_count' tool, ensuring it's an object with at least one of 'domain' or 'company' as strings.
    function isEmailCountParams(args: unknown): args is EmailCountParams {
      if (
        typeof args !== 'object' ||
        args === null
      ) {
        return false;
      }
    
      // At least one of domain or company must be provided
      if (
        !('domain' in args || 'company' in args)
      ) {
        return false;
      }
    
      // Check domain if provided
      if (
        'domain' in args &&
        (args as { domain: unknown }).domain !== undefined &&
        typeof (args as { domain: unknown }).domain !== 'string'
      ) {
        return false;
      }
    
      // Check company if provided
      if (
        'company' in args &&
        (args as { company: unknown }).company !== undefined &&
        typeof (args as { company: unknown }).company !== 'string'
      ) {
        return false;
      }
    
      return true;
    }
  • TypeScript interface defining the parameter shape for 'hunter_email_count' tool.
    interface EmailCountParams {
      domain?: string;
      company?: string;
    }
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 states the tool returns a count of email addresses, but doesn't explain how the count is derived (e.g., from a database, API limits), whether it requires authentication, rate limits, or what the output format is. For a tool with no annotations, this leaves significant gaps in understanding its operational behavior.

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 directly states the tool's purpose without unnecessary words. It's front-loaded with the core functionality and avoids redundancy, making it easy to parse quickly.

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 moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage guidelines, behavioral traits, and output expectations. Without annotations or an output schema, the description should do more to compensate, but it only meets the bare minimum for clarity.

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?

The input schema has 100% description coverage, with clear parameter descriptions for 'company' and 'domain'. The description adds minimal value beyond the schema by implying these are alternative inputs for counting emails, but doesn't provide additional context like examples, constraints, or how they interact. With high schema coverage, the baseline score of 3 is appropriate as the schema handles most of the documentation.

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: 'Know how many email addresses we have for a domain or a company.' It specifies the verb ('know how many') and resource ('email addresses'), and distinguishes the scope ('domain or a company'). However, it doesn't explicitly differentiate from siblings like hunter_domain_search or hunter_find_email, which might also involve domain-related queries.

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. It mentions 'domain or a company' but doesn't clarify if this is for counting emails versus searching or verifying them, nor does it reference sibling tools like hunter_domain_search or hunter_verify_email. There's no mention of prerequisites, exclusions, or comparative contexts.

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

Related 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/hunter-io-mcp-server'

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