Skip to main content
Glama

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
NameRequiredDescriptionDefault
emailYesEmail address to verify

Implementation Reference

  • 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, }; } }
  • 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, ], }));
  • 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' ); }
  • TypeScript interface defining the expected input parameters for the 'hatch_verify_email' tool.
    interface VerifyEmailParams { email: string; }

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