Start record import
start_record_importStarts a background job to import up to 100,000 rows into a data model, validating rows before writing them in batches; use it for imports over 1,000 rows.
Instructions
Import up to 100000 rows into a data model as a background job. Use it instead of import_records for more than 1000 rows. The rows are uploaded, then validated - nothing is written while any row is still unchecked - and the valid rows are written in batches. Returns the job at once: follow it with get_record_import until status is awaitingConfirmation, completed, failed or cancelled. With onInvalid STOP (the default) a job with invalid rows stops at awaitingConfirmation: read them with list_record_import_rows (status invalid), then confirm_record_import to write the valid rows or cancel_record_import to write none. A row over 65536 bytes is staged as invalid. A model runs one import at a time: a start while another is running is refused and the uploaded rows are discarded - read the running one with get_record_import by modelIdOrSlug.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"modelIdOrSlug": "<modelIdOrSlug>",
"rows": "<rows>"
},
"name": "start_record_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Array of plain objects keyed by the model's field keys, in the same shape import_records takes: a translatable field takes a language map ({ title: { en: '...', no: '...' } }). Row numbers in the job are positions in this array, starting at 1. | |
| onInvalid | No | What happens when validation refuses a row. STOP (the default) writes nothing and leaves the job awaitingConfirmation until confirm_record_import or cancel_record_import; CONTINUE writes the valid rows without asking. | |
| upsertKey | No | A key from the model's uniqueFields, or its product skuField. A row whose value matches an existing record updates that record; any other row is created. Not allowed on member (auth) models. | |
| modelIdOrSlug | Yes | Target model id or slug |