Bulk create items
bulk_create_itemsCreate up to 1000 items on one sheet in one call, in the order given. Use this after mapping a CSV or Excel the user attached onto the sheet columns. A call with 10 or more rows, or 3 or more rows with a colour, size, style, or option column, or 2 or more rows that repeat a product name, returns needs_input until plan_token from plan_import matches these rows, the plan target is sheet, and the token records a barcode choice that matches barcode_mode. Two rows with a colour or size column and different names are unchanged. SKU is optional. Empty SKU, brand, or type does not block after accepted_gaps on the token lists that code. An empty barcode is not a gap when barcode_choice is none or cloudlabels_ean13. Otherwise an empty barcode does not block after accepted_gaps lists that code. Do not invent those values. Under 10 rows with none of those signs is unchanged. plan_token is optional. When a token is sent, its signed answers must cover the relevant questions and barcode_mode must match barcode_choice. A token without answers is rejected: call plan_import again. Do not pick a default. When it is accepted, the result includes import_check and manual_fixes. Empty SKU is reported there and never blocks. Accepted gaps are not a mismatch. If mismatch is true, tell the user and do not hide it. Warnings from validate do not set mismatch. A strict rejection writes nothing, is not stored for idempotency_key, and is not an import_check failure. File barcode columns are ignored unless the token barcode choice is supplied. The server assigns the next number only when barcode_mode is cloudlabels_ean13 and the token records that choice. Omit barcode unless the file has a real GTIN the user chose to supply. The server then reserves the next numbers when sequential assignment already works. On a GS1 sheet, or a text column that already holds EAN-13 values, Show choices together. Clickable form if the client supports it. Otherwise one number, only when it cannot show choices. Wait. Do not choose for the user. Do not continue until the user has answered. Do you want barcodes? No, no barcodes now (barcode_mode="none"). Cloudlabels generates EAN-13 (codes starting with 2 are internal store codes, not registered GS1 codes), barcode_mode="cloudlabels_ean13". This call only. Does not change sheet settings. I have my own codes (own GTIN). No option is recommended. A needs_input error lists those options. If get_import_guide or plan_import is missing, reconnect MCP. The same rules still apply. If the organization has opted in to its GS1 company prefix for this column and the sheet standard is EAN-13, UPC-A, or EAN-8, empty barcodes reserve the next prefix numbers before saving and barcodeSource is gs1_prefix. The cell stores the digit body without the check digit. A full prefix is an error and does not fall back to a random code. Returns barcode plus barcodeSource per row. The plan item limit still applies. Optional validate defaults to false, so a caller that omits it is unchanged. validate true, strict true, or a non-empty required_columns list checks the rows before save. required_columns is skipped when validate is false. warnings lists row (1-based), column id, code (empty_required, not_numeric, or duplicate_row), and a short English message. The message names the row and the column id. It does not include the cell value or the column header. not_numeric applies when the column role or header is a price or quantity (unit cost, selling price, total qty, default location qty), or value_kind is currency. A grouped price such as 1 299,00, 1.299,00, 1,299.00, or a value with a currency symbol or code still counts as a number. With required_columns, duplicate_row is another row in this call with the same values in those columns. Without required_columns, duplicate_row is an exact copy: the same non-empty cells. Variants that share a name and differ in another column are not duplicates. strict true writes nothing when any warning is present and returns rejected true with count 0 and items []. That rejection is not stored for idempotency_key, so the same key can be sent again after the rows are corrected. Without strict, every row is still saved and warnings are included. Optional idempotency_key. Omit this field when it is not used. Null, an empty string, or only spaces are also treated as omitted. Use a unique value such as a UUID. The same key and the same arguments return the stored result for 24 hours and set idempotent_replay to true. A key still in progress is rejected until the lease expires (15 minutes by default). The same key can also stay reserved until the lease expires (15 minutes by default) after a call failed after writing rows, so check whether those rows were saved before trying again. The same key with different arguments is rejected. A stored result over 200 KB is replaced by a short summary of ids and counts.
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": {
"items": "<items>"
},
"name": "bulk_create_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| strict | No | ||
| validate | No | ||
| plan_token | No | ||
| barcode_mode | No | ||
| sheet_number | No | ||
| accepted_gaps | No | ||
| idempotency_key | No | Optional. Omit this field when it is not used. An empty string is also treated as omitted. Use a unique value such as a UUID when you send one. Same key and same arguments return the stored result for 24 hours in this organization, with idempotent_replay true. A different payload is rejected. | |
| required_columns | No |