Plan an import (dry run)
plan_importDry-run an import of a whole list with the product's own importer (the same one the app's import screen uses); it writes NOTHING. Arguments: the data rows (cells as strings, header row left out) and one columns entry per cell position with its target: name, description, category, homeLocation, currentLocation, responsiblePerson, currentHolder, blueprintName (an item model, by name), container (the item this row's item sits in: a vehicle, case or cart, named by the name or code of ANOTHER ROW of this file or of an existing item; a vehicle is an item with its own row, never a location), compartment (its compartment, e.g. «GR1», «Fahrerhaus»; created on the container when missing), code (a printed code or serial, the lasting way to tell identical pieces apart), quantity / minStock (stock items), trackingMode (quantity, menge, stückzahl, stueckzahl, bestand, pool (stock: a count of identical pieces) or serialized, serialisiert, einzeln, einzelstück, einzelstueck, unit (single pieces); a quantity or minStock value alone already makes a stock item), status, a fieldDefId from get_item_requirements or "field:"; null skips a column. Categories and locations are matched by name, paths split by separator ("Fahrzeuge/Anhänger"); a name that matches nothing is listed under toCreate and would be created by the import itself (a typo shows up there too). scaffold_categories creates categories and typed fields beforehand, scaffold_models item models. Dates as "YYYY-MM-DD" or "DD.MM.YYYY" only: other forms are dropped (see problems). Rows without a code are matched to existing items BY NAME, so every code-less name must be unique in the file, one stock article in several places aside (e.g. «Helm TLF», «Helm KLF» for two helmets). Single items are packed into their container; a stock row's count goes into it. One stock article in several places: one row per place, all with the SAME name (and the same code, if it has one), each with its own container, compartment and count; at most one of them without a container, whose count is the stock at the item's home. They become ONE stock item: the dry run shows the row without a container (else the first) as create and the others as place, and lists each article's places and total under stockGroups. Identical single pieces are not grouped: each needs its own name or code. The result says per row what would be created, updated or skipped, every value that would be dropped and why, what would be placed in which container and compartment and which compartments would be created, blockers that must be fixed first, columns the organization's plan cannot import, and whether the import lands past the plan's item allowance (allowed once: after that no published item can be added until the organization upgrades). It returns a planHash, which run_import takes with the same arguments. At most 1000 rows per call; the app's import screen takes longer lists as a CSV file. entity "persons" or "locations" imports people or places instead (targets: name, parentPath, email). Any member can plan; running needs the manager role.
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": {
"fileName": "<fileName>",
"columns": "<columns>",
"rows": "<rows>"
},
"name": "plan_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | The data rows of the source file, cells as strings, header row left out. At most 1000 rows per call | |
| entity | No | What the rows are: "items" (default), "persons" (people) or "locations" (places) | |
| columns | Yes | One entry per cell position of a row, in the same order | |
| fileName | Yes | The source file's name (shown in the app's import history), e.g. Inventar 2024.xlsx | |
| keepOrder | No | Items are imported last row first by default, so the file's first row is the newest item and the app's list opens on it; true keeps the file order | |
| separator | No | Path separator in category and location cells (default "/": "Fahrzeuge/Anhänger") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| rows | No | Rows sent | |
| notes | No | Notes on the plan's outcome | |
| order | No | reversed (default for items: the first row becomes the newest item, so the app's list opens on it) or "file" (keepOrder) | |
| entity | No | ||
| mapping | No | The columns that import, resolved | |
| refused | No | Set when the call was refused and nothing was written: tooManyRows, tooManyColumns, blockers, batchUndone | |
| summary | No | Rows by outcome: create / update / skip / place (adds stock in a place to another row's item, see stockGroups), and by status: ok / warnings (the row imports, a value is dropped) / errors (the row is skipped) | |
| blockers | No | What run_import refuses until it is fixed. Empty = none | |
| capacity | No | The plan's item allowance; null = no allowance | |
| fileName | No | ||
| planHash | No | run_import takes it with the SAME arguments; it changes when the rows or the organization's answers change | |
| problems | No | Every row that does not simply create an item cleanly: dropped values, skipped rows, updates of existing items | |
| toCreate | No | What the import itself would create by name — usually a typo when the structure was created first | |
| placements | No | Only with a container column: per container, the single items packed into it and the stock counts that go into it | |
| planChanged | No | run_import only: nothing was written, the plan changed | |
| stockGroups | No | Only with a container column: each stock article whose rows (one per place, same name and code) become ONE stock item — its total, the pieces at home and per place | |
| problemsShown | No | ||
| problemsTotal | No | ||
| stockGroupsTotal | No | ||
| columnsNotImported | No | Mapped columns the organization's plan cannot import |