Skip to main content

How to enrich a dataset with MCP

Use MCP dataset workflows when you want to add fields to many rows, preserve dataset lineage, or continue processing the result in another workflow. This guide covers the recommended sequence for enrichment and related dataset operations.

Choose the right operation

Use transform_dataset first when you need to reduce the number of rows processed by a paid workflow. Use enrich_dataset for structured fields, qualify_dataset for a yes/no or scored decision, and research_dataset for generated findings.

1. Inspect the dataset

Start by checking the dataset fields instead of assuming that every dataset has the same schema. Ask your MCP client:
Show the row count and available fields for dataset ds-7f3c2a. Do not start any paid work.
Use get_dataset and get_dataset_fields to inspect the dataset. Confirm that it contains a reliable company, person, or contact anchor for the operation you want to run.

2. Limit the input when needed

If the dataset is larger than necessary, create a smaller working dataset before enrichment:
Create a read-only working dataset containing the first 100 rows from ds-7f3c2a. Show the resulting row count and fields. Do not enrich it yet.
Use transform_dataset with an explicit, read-only filter or limit. Keep the returned output_dataset_id; it becomes the input for the next step.

3. Request a quote before paid work

Ask the client to show the fields, row count, and expected credit cost before starting enrichment:
For the working dataset, request company industry and size-range enrichment. Show the row count and credit quote, but do not start until I approve.
The client should call enrich_dataset without confirm: true for the initial quote-gated request. Preserve the selected account_id and the exact field names returned by get_dataset_fields.

4. Approve the same request

After reviewing the quote, explicitly approve the operation:
I approve this enrichment. Run the exact request you just quoted.
The client should repeat the same request with confirm: true. Do not change the dataset, fields, account, or row scope between the quote and confirmation without requesting a new quote.

5. Poll the workflow

Enrichment is asynchronous. Keep the returned workflow_run_id and poll it with get_workflow_run until it reaches a terminal state. If a polling call times out, the workflow may still be running. Continue with the same run ID instead of starting a duplicate enrichment. Keep the same account_id on every status call; see Continue a search or workflow.

6. Continue with the output dataset

When the workflow succeeds, use its output_dataset_id for the next preview, workflow, or download. Enrichment creates a child dataset; it does not silently replace the source dataset. Ask your MCP client:
Show the fields and row count for the enriched output dataset, then prepare it for the next approved workflow.
Use MCP enrichment reference for the exact request fields and MCP workflow reference for workflow status and output details.

Contact enrichment

Use contact_enrich when the input contains known contacts and the goal is discovering work email or phone data. It follows the same safety principles: inspect the input, review any quote or row count, approve paid work, and preserve the returned identifier for recovery. For company or person attributes on an existing dataset, prefer enrich_dataset instead of contact enrichment.