--- description: How to drive the Crustdata MCP server, and which Crustdata tool to reach for. Apply whenever using the crustdata MCP server (list_tools, get_schema, execute). alwaysApply: false --- The Crustdata MCP server is Code Mode. It exposes `list_tools`, `get_schema` and `execute`, plus `feedback` (for reporting a problem with Crustdata's own data or tools) when it's listed. Every data operation happens inside an `execute` script: ```js // user query: const r = await callTool('person_search', { filters, limit: 25 }); // r = { ok: true, data, credits_used? } | { ok: false, status, errorType, message } ``` - Start every `execute` script with a `// user query: ` line, or `// model query: ` for your own follow-up step. The server rejects a script without one before it runs, at no charge. - `list_tools`, `get_schema`, `execute` and `feedback` (when listed) are MCP tools: call them directly, never through `callTool`. Inside a script, `callTool('list_tools')` or `callTool('get_schema')` is rejected as an unknown tool. `callTool` only takes the names `list_tools` returns. - Write **plain JavaScript** for `execute` — any TypeScript syntax (`: Type`, `as`, generics) is a parse error that fails the whole run before anything is billed. - Call `get_schema({ names: [""] })` before building filters: it returns filterable columns and value formats; add `detail: "detailed"` for the full column list and a response example. - `in_`, `nin_`, `any_of` and `has_all` take an array. Wrap a single value, as in `in_(field, ['OpenAI'])`; a bare string throws. - A failed `callTool` returns `{ ok: false, ... }`; it does not throw. Check `ok` before using `data`. Order of preference (cheapest correct path first): - Company lookup: `company_identify` (FREE) → `company_enrich` by `crustdata_company_id` (2 credits per returned match; enriching by domain/name can fuzzy-match several companies and multiply the charge) - People search: `person_search` (indexed DB, ~0.03 credits/result) → only `person_search_live` (2 credits/result) when the DB returns 0 results or realtime data is required - Company search: `company_search` (~0.03 credits/result) → `company_search_live` (2 credits/result) only for realtime - Contact info (emails/phones): `person_contact_enrich` is THE tool — billed per contact type returned, no base fee, up to 25 profile URLs per call; narrow `fields` (e.g. `contact.business_emails`) to cap spend. Use `person_enrich` only for full profile data (work history, education, skills); its `preview: true` is free - Job listings: `job_search` (filters/sorts/aggregations, ~0.03 credits/result) or `job_search_live` (real-time retrieval by company, 2 credits/result) - Social posts: `social_post_list_live` (posts by one person or company) or `social_post_search_live` (keyword search across professional-network posts only); for X/Twitter, Reddit or any other network use `web_search_live` - Web: `web_search_live` (1 credit/query) and `web_enrich_live` (fetch a page by URL, 1 credit/page) - Credits: `account_credits` (FREE) for the balance; a data-API tool's result carries `credits_used` for the exact charge of that call (other tools, such as `account_credits`, return none) - Discover valid filter values: `company_autocomplete`, `person_autocomplete`, `job_autocomplete` (FREE) - Bulk lists (thousands of rows): the async `batch_*` twins (`batch_person_enrich`, `batch_company_search`, …) — submit, poll `batch_job_get`, read via `batch_results` - Alerts: `watch_create` / `watch_discovery_create`. Send the whole body with `preview: true` first (free, creates nothing), show the user what it found and what it will cost, then create it in a later `execute` run. The preview run returns `watch_preview_tokens`, a list of `{ tool, dataset, token, reported }`; pass the `token` of the entry whose `reported` matches the preview you showed as `preview_token`. The server refuses a create without that token, and refuses it inside the run that minted it. If you change the body after previewing, preview again. `watch_preview` only shows a sample notification and does not count. `list_tools` returns the full annotated tool list with per-tool pricing; trust it over this summary when they disagree.