MCPInventory
Update batches in bulk
distru-bulk-update-batchesWriteApplies the same changes to many batches in one all-or-nothing save: if any batch fails a check, nothing is saved and the error names the failing batches.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| ids | string[] | Yes | Batches to change. Resolve via distru-search-batches. |
| batchNumber | string or null | No | Your lot number, e.g. LOT-1241291. Need not be unique. Send null to clear it. |
| description | string or null | No | Send null to clear it. |
| thc | string or null | No | Free-text label, e.g. "18.5%"; not a lab result (see primaryTestResult). Send null to clear it. |
| cbd | string or null | No | Free-text label, e.g. "0.3%"; not a lab result (see primaryTestResult). Send null to clear it. |
| expirationDate | string or null | No | ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. Send null to clear it. |
| harvestDate | string or null | No | ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. Send null to clear it. |
| manufacturedDate | string | No | Cannot be cleared. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. |
| ownerId | string or null | No | Owning user. Resolve via distru-search-users. Send null to clear it. |
| customFields | object[] | No | Only the fields listed change. Required custom fields must be set, on update too, while still blank. |
| customFields[]. | string | Yes | Resolve via distru-search-custom-fields (entityType BATCH). |
| customFields[]. | string or string[] | Yes | TEXT: the text. DROPDOWN: the option name. CHECKBOX: an array of option names. DATE: YYYY-MM-DD, company timezone. "" or [] clears the field. |
Output
| Field | Type | Presence |
|---|---|---|
| ids | string[] | Always |
What the AI reads
Applies the same changes to many batches in one all-or-nothing save: if any batch fails a check, nothing is saved and the error names the failing batches. Pushes nothing to Metrc. For one batch, or to create or delete one, use distru-mutate-batch. Refused whole when an id is unknown, or permission denied when your team can't see a batch. Returns the ids changed; read the new values with distru-get-batch. Sparse update: only the fields passed change, on every batch; a field sent as null is cleared on all of them.