Run an import
run_importRun an import: the SAME arguments as plan_import, plus its planHash and a clientRequestId (e.g. a UUID). Everything lands in ONE import batch. If anything changed since the plan (the rows, or the organization now answers differently) it returns planChanged with the new outcome and writes nothing. A large list can return done: false; the same call with the same arguments and clientRequestId continues where it stopped and never duplicates. clientRequestId identifies the batch: the same id continues it, a new id starts a new batch (still checked against planHash). With a container column, the answer repeats the placements and the stock groups. Every created item's history shows the connected user's name with "(via AI agent)"; the import appears in the app's import history (webUrl), where it can be undone. Requires 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>",
"planHash": "<planHash>",
"clientRequestId": "<clientRequestId>"
},
"name": "run_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 | |
| planHash | Yes | The planHash plan_import returned for these arguments | |
| 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") | |
| clientRequestId | Yes | One id per import batch (e.g. a UUID); the same id continues a run that answered done: false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| done | No | false: the run stopped early; the same call with the same arguments and clientRequestId continues it | |
| 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 | ||
| status | No | ||
| webUrl | No | The app's import history, where the import can also be undone | |
| 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 | |
| thisCall | No | ||
| toCreate | No | What the import itself would create by name — usually a typo when the structure was created first | |
| totalRows | No | ||
| 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 | |
| committedRows | No | ||
| importBatchId | No | ||
| problemsShown | No | ||
| problemsTotal | No | ||
| stockGroupsTotal | No | ||
| columnsNotImported | No | Mapped columns the organization's plan cannot import |