hatch_verify_email
Validate email addresses to confirm they are active and deliverable. This tool checks email authenticity for reliable communication.
Instructions
Verify if an email address is valid and active.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Email address to verify |
Implementation Reference
- src/index.ts:408-441 (handler)The main handler for the 'hatch_verify_email' tool within the CallToolRequestSchema switch statement. Validates input using isVerifyEmailParams type guard, makes a POST request to the Hatch API '/v1/verifyEmail' endpoint with retry logic, and returns the JSON response or an error message.case 'hatch_verify_email': { if (!isVerifyEmailParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for hatch_verify_email' ); } try { const response = await withRetry( async () => apiClient.post('/v1/verifyEmail', args), 'verify 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:56-69 (schema)Tool schema definition for 'hatch_verify_email', including name, description, and input schema requiring a single 'email' string property.const VERIFY_EMAIL_TOOL: Tool = { name: 'hatch_verify_email', description: 'Verify if an email address is valid and active.', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Email address to verify', }, }, required: ['email'], }, };
- src/index.ts:312-320 (registration)Registration of the tool list handler via setRequestHandler for ListToolsRequestSchema, which includes 'hatch_verify_email' (VERIFY_EMAIL_TOOL) among the available tools.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ FIND_EMAIL_TOOL, FIND_PHONE_TOOL, VERIFY_EMAIL_TOOL, FIND_COMPANY_DATA_TOOL, GET_LINKEDIN_URL_TOOL, ], }));
- src/index.ts:157-164 (helper)Type guard helper function to validate if the tool arguments match the expected VerifyEmailParams shape (contains 'email' as string).function isVerifyEmailParams(args: unknown): args is VerifyEmailParams { return ( typeof args === 'object' && args !== null && 'email' in args && typeof (args as { email: unknown }).email === 'string' ); }
- src/index.ts:120-122 (schema)TypeScript interface defining the expected input parameters for the 'hatch_verify_email' tool.interface VerifyEmailParams { email: string; }