MCP tools for answer and lead exports
Queue CSV exports, retrieve their status, and understand download links, time windows, and personal-data handling.
Export tools create CSV files from collected data. They do not edit or publish your website configuration. An accepted request means a background job was queued, not that a download is ready.
MCP export access and sensitive data
All three operations accept an optional string project_id. You need an authorized MCP connection and access to the selected project. Missing or invalid project IDs, inaccessible projects, and unavailable MCP access produce errors.
Examples are illustrative and were not executed. Request objects are the parameters for MCP tools/call. Response objects are decoded payloads, without the MCP envelope. Project IDs and download paths are synthetic.
Exports can contain email addresses and free-text answers. The job writes its file to public export storage and returns a URL, not a signed user-specific download. Treat the URL as sensitive. The 24-hour status expiry is not a promise that the stored file becomes inaccessible at that instant.
export-answers
Queues an export of nonempty free-text records, including survey "Other" responses. This is not an export of every multiple-choice selection or every input-answer type.
| Argument | Type | Required | Default and behavior |
|---|---|---|---|
project_id | string | No | Active or eligible project. |
segment_id | string | No | Filters the answer record's segmentId, not the visitor's current membership in an arbitrary segment. |
There are no date-range, filename, or email-delivery arguments. Labels are resolved from the published configuration. The CSV columns are id, timestamp, question, content, email, and segments.
Rows are read newest first. The answer content and timestamp come from the recorded answer, while visitor enrichment can use the current stored email address and segment IDs. Do not interpret those enriched columns as a complete historical membership snapshot.
The operation creates a new job each time. Repeating it is not a status check. Failures during processing appear in the job's status rather than in the initial queued response.
export-leads
Queues a CSV export of lead-capture submissions for a time window.
Lead exports currently stop at 100 submissions. The file contains at most the 100 newest matching submissions. A job can report completed and set both total and processed to that smaller count even when the selected range contains more leads. Don't treat a completed job as proof of a complete export. Use a range known to contain at most 100 matching submissions, or contact support before relying on the file.
| Argument | Type | Required | Default and behavior |
|---|---|---|---|
project_id | string | No | Active or eligible project. |
start | string | No | ISO date/time; defaults to 30 days ago. |
end | string | No | ISO date/time; defaults to now. |
The CSV begins with Email. Additional columns come from published dimension mappings, dimension names, and the submission's custom fields, sorted alphabetically. Free-text responses can use the configured Other field or a Dimension name (Other) column. Unknown segment IDs can remain raw IDs; an unknown dimension is skipped. Column sets can differ between exports.
This creates a file asynchronously; it does not send email or synchronize contacts to an integration. Date parsing or queue failures can prevent creation. Repeating the call queues another export.
get-export-status
Retrieves a job's cached status. Use the same project that created the job.
| Argument | Type | Required | Default and behavior |
|---|---|---|---|
project_id | string | No | Active or eligible project. |
job_id | string | Yes | ID returned by an export operation. |
The returned object contains:
| Field | Meaning |
|---|---|
status | processing, completed, or failed. |
team_id | Internal team ID, not the public project_id. |
message | Current progress or failure description. |
created_at | Timestamp on the initially queued status. |
updated_at | Timestamp on job-written status updates. |
total, processed | Optional counts during processing. Not guaranteed on every update. |
download_url, filename | Present on successful completion. |
expires_at | Status/download metadata expiry recorded at completion, 24 hours later. |
Updates replace cached objects and refresh the status entry's 24-hour lifetime, so clients must not require all timestamp or progress fields on every response. The response does not repeat job_id. Reading status does not refresh that lifetime.
Illustrative completed response:
A missing job_id is an input error. Unknown jobs, expired status entries, and jobs belonging to a different project return the same not-found/expired error. Do not interpret it as an empty CSV. A failed status includes the worker's failure message. Start a replacement export only after determining whether the original job failed or merely remains in progress.
The status operation does not create, retry, delete, or extend an export. Publication and configuration undo do not affect export jobs or their files.