verify_email
Verify email deliverability in real-time with MX record, SMTP, and risk analysis to validate leads before campaigns.
Instructions
Check email deliverability in real-time: MX records, SMTP, disposable/role detection. Read-only. Requires API key. Rate limit: 30/min per user. Use after search_leads or before sending campaigns. Returns deliverability score and risk assessment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Single email address to verify. Must be a valid RFC-like address format. |
Implementation Reference
- src/index.ts:131-141 (registration)Tool registration for 'verify_email' — defines the tool name, description, and input schema (expected 'email' string). This is part of a fallback tool list used when the API is unreachable. When the API is available, tool definitions (including verify_email) are fetched dynamically from the Leadloadz API.
{ name: "verify_email", description: "Check email deliverability in real-time: MX records, SMTP, disposable/role detection. Read-only. Requires API key. Rate limit: 30/min per user. Use after search_leads or before sending campaigns. Returns deliverability score and risk assessment.", inputSchema: { type: "object" as const, properties: { email: { type: "string", description: "Single email address to verify. Must be a valid RFC-like address format." } }, required: ["email"] } }, - src/index.ts:205-283 (handler)Generic tool call handler — the 'verify_email' tool is handled generically via apiClient.callTool(name, args). The tool name 'verify_email' is passed to the Leadloadz API (via JSON-RPC 'tools/call'), which executes the actual email verification logic server-side. No client-side specific logic exists for verify_email.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params // Validate tool exists const tool = cachedTools.find((t) => t.name === name) if (!tool) { telemetry.track("tool_called", { tool: name, success: false, reason: "unknown_tool" }) return { content: [ { type: "text", text: JSON.stringify( { error: `Unknown tool: '${name}'. Available tools: ${cachedTools.map((t) => t.name).join(", ")}`, }, null, 2 ), }, ], isError: true, } } // Call the API const result = await apiClient.safeCall(() => apiClient.callTool(name, args || {})) if (!result.success) { telemetry.track("tool_called", { tool: name, success: false, reason: "api_error" }) return { content: [ { type: "text", text: JSON.stringify({ error: result.error }, null, 2), }, ], isError: true, } } const response = result.data // Check for JSON-RPC error in the response if (response.error) { telemetry.track("tool_called", { tool: name, success: false, reason: "rpc_error", code: response.error.code }) return { content: [ { type: "text", text: JSON.stringify( { error: response.error.message, code: response.error.code, }, null, 2 ), }, ], isError: true, } } // Track successful tool call telemetry.track("tool_called", { tool: name, success: true, arg_count: Object.keys(args || {}).length, }) // Return successful result return { content: [ { type: "text", text: JSON.stringify(response.result, null, 2), }, ], } }) - src/api-client.ts:139-213 (handler)API client's callTool method — sends a JSON-RPC request to the Leadloadz API with method 'tools/call' and params { name, arguments }. For 'verify_email', the arguments would contain { email: string }. The actual verification (MX records, SMTP, disposable/role detection) is performed by the remote API server.
async callTool( name: string, args: Record<string, unknown> ): Promise<ToolCallResponse> { const url = `${this.config.baseUrl}` const response = await this.fetchWithTimeout(url, { method: "POST", headers: this.headers(), body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name, arguments: args, }, }), }) if (!response.ok) { // Map HTTP status codes to user-friendly messages const status = response.status let message: string switch (status) { case 401: message = "Authentication failed. Your API key may be invalid or revoked." break case 403: message = "Access denied. Your API key does not have permission to use this tool." break case 429: message = "Rate limit exceeded. Please wait a moment before trying again." break case 500: case 502: case 503: case 504: message = "The Leadloadz API is temporarily unavailable. Please try again later." break default: message = `The Leadloadz API returned an error (status ${status}). Please try again.` } return { jsonrpc: "2.0", id: 1, error: { code: MCPErrorCode.InternalError, message, }, } } let data: unknown try { data = await response.json() } catch { return { jsonrpc: "2.0", id: 1, error: { code: MCPErrorCode.InternalError, message: "The Leadloadz API returned an invalid response. Please try again later.", }, } } return data as ToolCallResponse } - src/index.ts:134-140 (schema)Input schema for verify_email — defines an 'email' property (type: string) as required. No separate output schema is defined in the client; the response is returned as JSON from the API.
inputSchema: { type: "object" as const, properties: { email: { type: "string", description: "Single email address to verify. Must be a valid RFC-like address format." } }, required: ["email"] }