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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"firstName": "<firstName>",
"lastName": "<lastName>",
"domain": "<domain>"
},
"name": "hatch_find_email"
}
}Input 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 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, }; } } - src/index.ts:18-39 (schema)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'], }, }; - src/index.ts:135-146 (helper)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' ); } - src/index.ts:110-113 (schema)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, ], }));