Для AI-агентов: markdown этой страницы — /docs/mcp-pull.mdиндекс документации — /llms.txt
MCP: pull
Обновлено
Определения инструментов. Обновляйте tools/list после изменения прав. required_scopes: ALL.
export_form_submissions_normalized
Export one form's submissions as a FLAT table — one row per submission, one column per answer field, headers in alphabetical order — so you never have to unpick raw JSON. Columns are `seq_num`, `created_at` (in the business's own timezone), `status`, `linked_user_seq_num`, `channel`, then every field name that form has ever collected. Returns an `export_id`; poll the exports endpoint for the download link (it is a temporary signed URL). One export runs at a time per key. This file DOES contain the answers themselves — it is the sanctioned way to hand the owner their own data, so tell them where it came from and do not paste its contents back into the conversation.
Scopes (ALL): ["pull:form_submissions"]. Risk: "write".
get_form_submission
Read ONE submission by its own `seq_num` (the id you pass to get and to `set_form_submission_handled`), not the form number or public code. Same fields as `pull_form_submissions`, and the same rule about the answers: 🔴 `payload` is returned only with `include: "full_payload"`, and that opt-in writes an audit row naming the api key, the form and the moment. A submission number that belongs to another account simply does not exist here. 0-cost read.
Scopes (ALL): ["pull:form_submissions"]. Risk: "read".
pull_form_submissions
List the submissions this business's own hosted forms collected, newest first. Returns the submission own `seq_num` (the id you pass to get and to `set_form_submission_handled`), its separate public `submission_code`, `created_at`, `status` (`anonymous` = the visitor has not been matched to a messenger user yet, `linked` = they have), `form_seq_num` with the form title as it was at the time, and — once linked — `linked_user_seq_num` and `channel`. Filter by `form_seq_num` (the number `site_form_declare` returned), `status` and a date range; page with the opaque `cursor` from the previous answer. 🔴 The ANSWERS THEMSELVES are not included: what a visitor typed is personal data, so `payload` comes back only if you pass `include: "full_payload"`, and that opt-in is recorded in the account's audit trail. Do not pass it to count leads or to check whether a form works — this call already tells you that. Pass it only when the owner asked you to read the actual answers.
Scopes (ALL): ["pull:form_submissions"]. Risk: "read".
query_form_submission_segment
Turn form answers into an AUDIENCE: given a form and one or more `(key, value)` pairs the visitor answered, get back `user_seq_nums` — the per-tenant seq_num of the users who answered that way — plus `segment_selection`, an entry you can drop UNCHANGED into the `include` or `exclude` list of a broadcast's segment. All the pairs must hold together (AND). There is no `or` and no `not`, and none is needed: for "A or B" call twice and put both results in `include` (that list is a union); for "A but not B" put the second result in `exclude`. 🔴 This call never returns what anyone wrote — only WHO wrote it. `truncated: true` means the account's 5000-recipient cap cut the list short, so narrow the pairs rather than sending to a partial audience.
Scopes (ALL): ["pull:form_submissions"]. Risk: "read".