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
| Name | Required | Description | Default |
|---|---|---|---|
| firstName | Yes | First name of the person | |
| lastName | Yes | Last name of the person | |
| domain | Yes | Company domain name |
Implementation Reference
- src/index.ts:338-371 (handler)Handler for the 'hatch_find_email' tool. Validates input using isFindEmailParams type guard, calls the Hatch API endpoint '/v1/findEmail' with retry logic, and returns the response or error.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, }; } }
- src/index.ts:18-39 (schema)Tool schema definition for 'hatch_find_email', including name, description, and input schema with properties for firstName, lastName, and domain.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'], }, };
- src/index.ts:110-114 (schema)TypeScript interface defining the input parameters for the hatch_find_email tool.interface FindEmailParams { firstName: string; lastName: string; domain: string; }
- src/index.ts:135-146 (helper)Type guard function to validate if arguments match FindEmailParams for hatch_find_email.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' ); }
- src/index.ts:312-320 (registration)Registration of tools list handler where FIND_EMAIL_TOOL (hatch_find_email) is included and advertised to MCP clients.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ FIND_EMAIL_TOOL, FIND_PHONE_TOOL, VERIFY_EMAIL_TOOL, FIND_COMPANY_DATA_TOOL, GET_LINKEDIN_URL_TOOL, ], }));