How to validate emails with AI agents
Email validation used to be a separate step. Export a CSV. Upload it to a web tool. Wait 20 minutes. Download the results. Merge them back into your spreadsheet. Repeat every time your list changes. It worked, but it was slow, manual, and disconnected from the rest of your workflow.
AI agents change this. An agent running in your terminal can validate emails inline, as part of a larger workflow. Find a contact, validate the email, skip if invalid, move on. No file exports. No waiting. No context switching. The validation happens inside the same process that found the email in the first place.
This guide covers why email validation matters for outbound, how agents handle it differently, and how to use gtmcli with Claude Code or any MCP-compatible agent to validate emails programmatically.
Why email validation matters for outbound
Sender reputation is the currency of email deliverability. Every bounce erodes it. Every spam trap hit damages it severely. Once your reputation drops below a threshold, inbox providers route your messages to spam by default. Recovery takes weeks of clean sending behavior.
The numbers are stark. Google wants your bounce rate below 2%. Microsoft enforces similar limits. A single campaign with a 5% bounce rate can trigger throttling on your entire sending domain. Not just that campaign. Everything you send from that domain.
For cold outbound, the risk is even higher. You are emailing people who did not opt in. The addresses come from data providers, web scraping, or manual research. Error rates of 15-25% are common in unvalidated lists. That means one in five emails bounces. Your domain reputation will not survive that.
Validation catches the bad addresses before you send. It checks whether the mailbox exists at the SMTP level. It flags disposable addresses, role-based inboxes, and catch-all domains. A validated list typically bounces below 1%. That is the difference between a healthy sending domain and a blacklisted one.
The old way: upload, wait, download
For years, the email validation workflow looked the same regardless of which tool you used. Export your list as a CSV. Log into ZeroBounce, NeverBounce, or whichever validation service. Upload the file. Wait for it to process. Download the results. Open both files. Match the results back to your original data. Remove the invalids. Re-upload to your CRM or sequencer.
This process has multiple failure points. You lose context between the export and import. Columns get mismatched. Duplicate rows creep in. The file you uploaded was already stale because new contacts were added while you waited for results. And you have to repeat the entire cycle every time your list changes.
The bigger problem is that validation is disconnected from the workflow that created the data. You find emails in one tool, validate them in another, and load them in a third. Each handoff introduces delay and error. Most teams validate once and never re-check, which means list decay goes unnoticed until bounce rates spike.
The new way: agents validate inline
With an AI agent, validation becomes a step in a pipeline, not a separate workflow. The agent finds an email, validates it immediately, and only proceeds if the address is valid. No export. No upload. No wait.
Here is what that looks like with Claude Code and gtmcli:
> "Find the VP of Marketing at acme.com and validate their email before adding to my list." Claude Code runs: gtmcli find-email --name "..." --domain acme.com → found: sarah@acme.com gtmcli validate sarah@acme.com → status: valid, catch_all: false "sarah@acme.com is valid. Added to your list."
The agent made two API calls and gave you a validated contact in seconds. If the email had been invalid, the agent would have told you and moved on. No bad data enters your pipeline.
This pattern works at any scale. One contact or one thousand. The agent loops through the list, validates each address, filters out the bad ones, and gives you a clean result. The validation is embedded in the workflow, not bolted on after the fact.
gtmcli validate: the commands
gtmcli provides both single-email and batch validation through the CLI. Here are the core commands.
Single email validation
gtmcli validate jeff@example.com
{
"email": "jeff@example.com",
"status": "valid",
"catch_all": false,
"disposable": false,
"role": false,
"free_provider": false,
"mx_found": true,
"smtp_check": true
}One credit per validation. The response includes everything you need to decide whether to send: deliverability status, catch-all flag, disposable detection, role-based detection, and the raw SMTP check result.
Batch validation from CSV
gtmcli validate --file contacts.csv --email-column email Processing 500 emails... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% Results written to contacts_validated.csv Summary: valid: 412 (82.4%) invalid: 43 (8.6%) catch_all: 31 (6.2%) disposable: 8 (1.6%) unknown: 6 (1.2%)
Batch mode reads your CSV, validates every email in the specified column, and writes a new CSV with the original data plus validation columns appended. No data loss. No column mismatches. The output is ready to import directly into your CRM or sequencer.
Using gtmcli as an MCP tool
MCP (Model Context Protocol) lets AI agents call external tools natively. When you configure gtmcli as an MCP server, Claude Code can call validation directly without shelling out to the CLI. The agent treats it like a built-in capability.
# In your Claude Code MCP config (.mcp.json):
{
"mcpServers": {
"gtmcli": {
"command": "npx",
"args": ["gtmcli", "mcp"],
"env": {
"GTMCLI_API_KEY": "your_key_here"
}
}
}
}Once configured, the agent has access to tools like validate_email, find_email, and enrich_domain. The agent calls these tools directly through the MCP protocol. No subprocess spawning. No output parsing. Clean, structured data in and out.
# What the agent sees internally:
Tool call: validate_email({ email: "sarah@acme.com" })
Result: {
status: "valid",
catch_all: false,
disposable: false,
role: false
}MCP integration means the agent can validate emails mid-thought. It does not need to stop, write a script, and execute it. The validation is a function call, same as reading a file or searching the web. This makes multi-step workflows much faster and more reliable.
Understanding validation statuses
Every validation returns a status. Knowing what each one means is critical for making good sending decisions.
valid
The mailbox exists and accepts mail. The SMTP server confirmed the address. Safe to send. This is the green light. About 70-85% of a healthy list should be valid.
invalid
The mailbox does not exist. The SMTP server explicitly rejected the address. Never send to these. Remove them from your list immediately. Sending to invalid addresses causes hard bounces that damage your sender reputation directly.
catch_all
The domain accepts all emails regardless of the mailbox name. The server says "yes" to everything, so we cannot confirm whether the specific address is real. About 20-30% of B2B domains are configured as catch-all. You can send to these, but monitor bounce rates more closely. gtmcli also returns a valid_catchall sub-status when we have additional signals confirming the address is likely real.
disposable
The address uses a disposable email service like Mailinator, Guerrilla Mail, or TempMail. These addresses are temporary and usually abandoned within hours. Do not send outbound to disposable addresses. They indicate the person deliberately avoided giving a real address.
unknown
The mail server did not respond or returned an ambiguous result. This happens when servers are temporarily down, rate-limiting our checks, or configured to neither accept nor reject during SMTP verification. Retry these after 24 hours. Most will resolve to valid or invalid on a second attempt. gtmcli does not charge credits for unknown results.
Batch validation with an agent: step by step
Here is how to validate a full CSV of contacts using Claude Code and gtmcli. This is the workflow most GTM teams need.
Prompt to Claude Code: "I have a file called leads.csv with columns: name, email, company, title. Validate every email using the gtmcli validate_email MCP tool. Create three output files: 1. leads_valid.csv — only valid and valid_catchall emails 2. leads_risky.csv — catch_all emails (not confirmed valid) 3. leads_invalid.csv — invalid and disposable emails Add a 'validation_status' column to each file. Print a summary when done."
The agent reads the CSV, iterates through each row, calls the validation tool, categorizes each result, and writes three clean output files. It preserves all original columns. Nothing gets lost in translation.
Agent output: Validated 1,247 emails in 4m 12s. Results: leads_valid.csv: 983 contacts (78.8%) leads_risky.csv: 142 contacts (11.4%) leads_invalid.csv: 122 contacts (9.8%) Credits used: 1,247 Unknown (not charged): 23 — will retry in 24hrs
The valid file goes straight to your sequencer. The risky file gets sent with monitoring. The invalid file stays out of your pipeline entirely. Total cost for 1,247 validations: about $12.47 at $0.01 per credit.
Compare that to the old way. Exporting from your CRM, uploading to a validation tool, waiting for processing, downloading results, manually sorting into segments, re-importing. That is 30-45 minutes of manual work per batch. The agent does it in 4 minutes with zero manual steps.
When to validate
Validate at the point of entry. When an email is first found or added to your system, validate it immediately. Do not wait until you are about to send. By then, bad data has already propagated through your pipeline.
Re-validate monthly. Email addresses decay at roughly 30% per year. That means 2-3% of your list goes bad every month. A monthly validation pass catches this decay before it causes bounces.
Validate before every large campaign. If you are about to send 5,000 emails, spend the 5 minutes and $50 to validate the list first. The cost of not validating is much higher: bounced emails, damaged reputation, and the cascading effect on all your other sends.
With agents, you do not have to remember to validate. Build it into your workflow. Every pipeline that touches email data should include a validation step. It becomes automatic, like running tests before deploying code.
Try gtmcli
100 free credits. No credit card.