---
name: inboxfound
description: Find and live-verify B2B work emails via InboxFound MCP (https://inboxfound.com/api/mcp) or REST API (https://inboxfound.com/api/v1). Use when enriching leads, finding work emails from names and company domains, or verifying email lists before outbound sending.
---

# InboxFound Agent Playbook

Use InboxFound to find work emails (`name` + bare company `domain`) and verify mailboxes live against the receiving mail server (including catch-all identity checks at no surcharge).

## 1. Authentication & Secret Hygiene

- **OAuth 2.1 (recommended for MCP):** Add `https://inboxfound.com/api/mcp` in Claude, Claude Code, or Cursor and sign in with your InboxFound account. No manual API key is needed; manage or revoke connected clients at `https://inboxfound.com/app/keys`.
- **API keys (REST & headless MCP):** Read the key from the `INBOXFOUND_API_KEY` environment variable. Never echo, print, commit, or paste raw `ak_...` secrets into chat messages, logs, or project files. Keys are scoped (`find`, `verify`, or both) and created at `https://inboxfound.com/app/keys`.

## 2. Connect via MCP (Recommended) or REST

- **Hosted Streamable HTTP MCP:** `https://inboxfound.com/api/mcp` (OAuth 2.1 or `Authorization: Bearer $INBOXFOUND_API_KEY`)
- **REST Base URL:** `https://inboxfound.com` (OpenAPI 3.1: `https://inboxfound.com/openapi.yaml`)

MCP tools:
- `get_account` (free): live balance, rates, estimates, scopes, Auto top-up status
- `find_email`: `{ name, domain, idempotency_key? }`
- `verify_email`: `{ email, idempotency_key? }`
- `find_emails_batch`: `{ jobs?: [{ name, domain, key? }], csv?: "...", batch_id?, compact? }` (up to 1,000 rows/call; share one `batch_id` across chunks for 1,000-10,000+ rows; >50 rows auto-compact)
- `verify_emails_batch`: `{ jobs?: [{ email, key? }], csv?: "...", batch_id?, compact? }` (up to 1,000 rows/call; accepts CSV or newline-separated emails; >50 rows auto-compact)
- `get_batch` (free): `{ batch_id, operation?, view?: "summary" | "compact" | "csv" | "full", status_filter?, limit?, offset?, advance? }` — tracks progress across the entire batch, advances up to 40 pending jobs, and exports paginated JSON or formula-safe CSV
- `list_batches` (free): `{ operation?, limit? }` — lists recent MCP batches so you can resume runs across conversations
- `get_jobs` (free): `{ ids: [...] }` (1 to 100 UUIDs; advances up to 40 pending jobs per call)

## 3. Mandatory Pre-Flight & Budget Safety

1. **Always call `get_account` (or `GET /api/v1/account`) first.** Confirm your key has the needed scope (`find` / `verify`) and check `availableMicros` and `rates` (1,000,000 micros = $1.00).
   - Current rates: Find = $0.008 (8000 micros), Verify = $0.002 (2000 micros).
2. **Before submitting a list or CSV**, calculate the worst-case cost (`rows × rate`) and confirm it fits within `availableMicros`. Report row count and maximum cost to the user first.
3. While `autoTopUpEnabled` is `false`, spend is strictly capped by `availableMicros`.

## 4. Idempotency Rules (Never Double-Charge on Retries)

- Every write accepts a 16 to 100 character key (`[a-zA-Z0-9_-]`).
- For CSVs or pipelines, persist a stable per-row key (e.g. `sha256(run_id + ":" + row_id + ":" + operation)` truncated to 64 hex chars) **before** submitting.
- On timeout, network error, or process restart, **retry with the exact same key**. InboxFound replays the original job at $0.00 instead of creating a second reservation.
- Never reuse the same key for a different input (returns `409 idempotency_conflict`).
- On single MCP calls (`find_email` / `verify_email`) and unkeyed MCP batches, if you omit explicit keys, InboxFound derives deterministic per-UTC-day keys automatically (plus a 10-minute lookback after midnight) so tool retries do not double-charge. For multi-chunk bulk lists (>1,000 rows), choose a stable `batch_id` (4-40 alphanumeric/hyphen chars, e.g. `q4-leads-dec6`) and reuse it on every 1,000-row chunk for automatic deduplication and single-handle tracking via `get_batch`.

## 5. Async Execution & Polling Cadence

- Every lookup is asynchronous. Single and batch MCP calls dispatch immediately (batches eagerly dispatch up to 40 rows on submit) and return durable job ID(s) / `batch_id`. **A pending (`queued` / `running`) return is normal, not an error.**
- For single lookups or explicit-key batches, poll pending jobs via `get_jobs` (up to 100 IDs/call via MCP advancing up to 40 pending jobs, or 20 IDs/call via `POST /api/v1/jobs/batch`) every **8 to 10 seconds**.
- For bulk runs with a `batch_id`, poll `get_batch({ batch_id, view: "summary" })` every **8 to 10 seconds** (each call advances up to 40 pending jobs while keeping token usage tiny). Once `done: true`, fetch results with `view: "compact"` or `view: "csv"` (paginated up to 200 rows/page, with optional `status_filter`). Use `list_batches` to find prior runs in a fresh conversation.
- Stop polling when `execution_state` is:
  - `complete`: read `result` and `billing` (`charged` or `released`)
  - `incomplete`: stage timed out or failed; `billing` is `released` ($0.00)
  - `review`: parked for operator review; **stop polling and never resubmit**

## 6. Result Decision Table

### Verify (`result.operation === "verify"`)
| `status` | `billing` | Meaning & Agent Action |
|---|---|---|
| `valid` | `charged` | Accepted by live mail server (or `reason: "profile_linked"` on a catch-all). Usable; check `role`, `free`, `disposable` flags. |
| `invalid` | `charged` | Rejected by mail server or domain has no MX. Exclude from sending. |
| `catch_all` | `released` ($0) | Domain accepts every address and no profile matched. Do not treat as verified; do not guess. |
| `unknown` | `released` ($0) | Greylisted, policy-blocked, or inconclusive. Only retry later if `retryable === true`. |

### Find (`result.operation === "find"`)
| `status` | `billing` | Meaning & Agent Action |
|---|---|---|
| `found` | `charged` | One candidate qualified. Check `confidence` (`high`, `medium`, `low`) and `mailbox` validity before sending. |
| `not_found` | `released` ($0) | All candidate patterns rejected. Do not fabricate an address. |
| `unknown` | `released` ($0) | Ambiguous, catch-all unconfirmed, or host unavailable. Never treat as proof the person has no email. |

## 7. Error Recovery

- `401 valid_api_key_required` / `invalid_or_revoked_key`: Re-authorize via OAuth or check `INBOXFOUND_API_KEY`.
- `402 insufficient_funds`: Stop submitting, inform the owner to add prepaid credit at `https://inboxfound.com/app/billing`, then resume using the saved row keys.
- `403 key_scope_denied`: Check `get_account` scopes; re-authorize with `find` / `verify` permissions or create a scoped key at `https://inboxfound.com/app/keys`.
- `409 idempotency_conflict`: Key was already bound to different input; inspect saved state before minting a new key.
- `429 rate_limit_exceeded`: Honor `Retry-After` / `retry_after_seconds` and retry with the same key.
- `personal_provider_find_not_supported`: `find` requires a bare company domain (not `gmail.com`, etc.).
