--- name: reachiz-lead-list description: Use when the user asks to build a lead list on Reachiz — "find me heads of marketing in Germany", "build a list of SaaS CTOs", "get me contacts matching this ICP" — and enrich or export it through the Reachiz MCP. --- # Build a lead list with Reachiz Endpoint context: every tool below runs on the connected `reachiz` MCP server. Tools not in the default list (22 tools) must be called as `call_tool { name: "", arguments: {...} }` — calling them directly returns "Invalid params". ## Steps 1. `get_started` — pick the workspace (arg or `X-Reachiz-Workspace` header when several) and read `credits.balance`. If `credits` is null the key lacks `billing.read`; say so and quote nothing. 2. `post_searches` — `body: { title, location, industry, companySize, keywords, maxResults, listName }` plus `confirm: true`. Returns `{ id, listId, status: "running" }` — the search is async. 3. Poll with `call_tool { name: "get_searches_by_id", arguments: { params: { id } } }` until `status` is `done` or `failed`. On `failed`, `error` holds the cause (for example provider not configured) — report it and stop. 4. If the user already had a list or the search made one, top up manually: `post_lists` `body: { name }`, then `post_lists_by_id_leads` `params: { id }`, `body: { profiles: [{ linkedInUrl }, ...] }` (all profiles in one call). Result counts `added`, `skipped`, `invalid` — URLs in `invalid` were rejected; report them. 5. Before enriching, quote: `post_quote { name: "post_lists_by_id_enrich", arguments: { params: { id }, body: { what: "email" } } }` → `credits` is the max debit, `gate.confirmRequired` tells whether the real call needs approval. 6. Enrich only after the user approves the quote: `post_lists_by_id_enrich` `params: { id }`, `body: { what: "email" | "phone" }`, `confirm: true`. Returns `{ queued, maxCredits }`. A miss costs 0. 7. Optionally verify one lead's email: `post_leads_by_id_verify` `params: { id: leadId }`, `body: { what: "email" }`, `confirm: true`. 8. Export: `get_lists_by_id_export` `params: { id }` → `{ filename, rows, csv }`. ## Ask the user first - Before step 2: the search charges per lead added — state `maxResults` and get approval (spend gate). - Before step 6: read the `post_quote` number aloud, ask "enrich N leads for up to X credits?" - Never send `confirm: true` the user did not approve for that exact call. ## Common errors (real responses) - `isError` "Not run: this tool spends credits or runs a paid AI model. Ask the user to approve it, then call again with confirm: true" — you forgot `confirm`; ask the user, do not retry silently. - `status: "failed"` on the search with `error` text — provider or config problem; report the `error` string verbatim. - `isError` "Invalid params" — you called a non-default tool directly; wrap it in `call_tool`. - `invalid` count in the add-leads result — malformed or rejected `linkedInUrl` values; fix the input, don't re-add. ## Stop rule Stop after the export (or after a `failed` search / refused spend). Do not retry a failed search more than once without telling the user why it failed.