hatch_verify_email
Check email address validity and activity to confirm contact information accuracy.
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 logic for the 'hatch_verify_email' tool within the CallToolRequestSchema switch statement. It validates input using isVerifyEmailParams, makes an API call to '/v1/verifyEmail' 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 inputSchema specifying the required 'email' string parameter.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 'hatch_verify_email' tool (as VERIFY_EMAIL_TOOL) in the list of available tools returned by ListToolsRequestSchema handler.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 input arguments for the 'hatch_verify_email' tool, ensuring 'email' is a string.function isVerifyEmailParams(args: unknown): args is VerifyEmailParams { return ( typeof args === 'object' && args !== null && 'email' in args && typeof (args as { email: unknown }).email === 'string' ); }