Skip to main content
Glama

hatch_find_email

Find email addresses by entering a person's first name, last name, and company domain to locate professional contact information.

Instructions

Find an email address using first name, last name, and domain information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
firstNameYesFirst name of the person
lastNameYesLast name of the person
domainYesCompany domain name

Implementation Reference

  • Handler for the 'hatch_find_email' tool. Validates input parameters using the isFindEmailParams type guard, makes a POST request to the Hatch API endpoint '/v1/findEmail' with retry logic, and returns the JSON response or an error message.
    case 'hatch_find_email': { if (!isFindEmailParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for hatch_find_email' ); } try { const response = await withRetry( async () => apiClient.post('/v1/findEmail', args), 'find email' ); 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 schema definition for 'hatch_find_email', including name, description, and input schema specifying required firstName, lastName, and domain parameters.
    const FIND_EMAIL_TOOL: Tool = { name: 'hatch_find_email', description: 'Find an email address using first name, last name, and domain information.', inputSchema: { type: 'object', properties: { firstName: { type: 'string', description: 'First name of the person', }, lastName: { type: 'string', description: 'Last name of the person', }, domain: { type: 'string', description: 'Company domain name', }, }, required: ['firstName', 'lastName', 'domain'], }, };
  • Type guard function isFindEmailParams used to validate input arguments for the hatch_find_email handler.
    function isFindEmailParams(args: unknown): args is FindEmailParams { return ( typeof args === 'object' && args !== null && 'firstName' in args && typeof (args as { firstName: unknown }).firstName === 'string' && 'lastName' in args && typeof (args as { lastName: unknown }).lastName === 'string' && 'domain' in args && typeof (args as { domain: unknown }).domain === 'string' ); }
  • TypeScript interface defining the input parameters for hatch_find_email.
    interface FindEmailParams { firstName: string; lastName: string; domain: string;
  • src/index.ts:312-320 (registration)
    Registration of tools list handler, which includes FIND_EMAIL_TOOL in the response to list tools requests.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ FIND_EMAIL_TOOL, FIND_PHONE_TOOL, VERIFY_EMAIL_TOOL, FIND_COMPANY_DATA_TOOL, GET_LINKEDIN_URL_TOOL, ], }));

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/hatch-mcp-server'

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