Skip to main content
Glama

Mango Inventory

Run an import

run_import
Destructive

Run 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

NameRequiredDescriptionDefault
rowsYesThe data rows of the source file, cells as strings, header row left out. At most 1000 rows per call
entityNoWhat the rows are: "items" (default), "persons" (people) or "locations" (places)
columnsYesOne entry per cell position of a row, in the same order
fileNameYesThe source file's name (shown in the app's import history), e.g. Inventar 2024.xlsx
planHashYesThe planHash plan_import returned for these arguments
keepOrderNoItems 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
separatorNoPath separator in category and location cells (default "/": "Fahrzeuge/Anhänger")
clientRequestIdYesOne id per import batch (e.g. a UUID); the same id continues a run that answered done: false

Output Schema

NameRequiredDescriptionDefault
doneNofalse: the run stopped early; the same call with the same arguments and clientRequestId continues it
nextNo
rowsNoRows sent
notesNoNotes on the plan's outcome
orderNoreversed (default for items: the first row becomes the newest item, so the app's list opens on it) or "file" (keepOrder)
entityNo
statusNo
webUrlNoThe app's import history, where the import can also be undone
mappingNoThe columns that import, resolved
refusedNoSet when the call was refused and nothing was written: tooManyRows, tooManyColumns, blockers, batchUndone
summaryNoRows 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)
blockersNoWhat run_import refuses until it is fixed. Empty = none
capacityNoThe plan's item allowance; null = no allowance
fileNameNo
planHashNorun_import takes it with the SAME arguments; it changes when the rows or the organization's answers change
problemsNoEvery row that does not simply create an item cleanly: dropped values, skipped rows, updates of existing items
thisCallNo
toCreateNoWhat the import itself would create by name — usually a typo when the structure was created first
totalRowsNo
placementsNoOnly with a container column: per container, the single items packed into it and the stock counts that go into it
planChangedNorun_import only: nothing was written, the plan changed
stockGroupsNoOnly 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
committedRowsNo
importBatchIdNo
problemsShownNo
problemsTotalNo
stockGroupsTotalNo
columnsNotImportedNoMapped columns the organization's plan cannot import

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedInput schema / properties / clientRequestId / description
      Previous value: -"A fresh id (e.g. a UUID) per confirmed import; reuse it ONLY to continue a run that answered done: false"New value: +"One id per import batch (e.g. a UUID); the same id continues a run that answered done: false"
    • changedInput schema / properties / fileName / description
      Previous value: -"Your user's file name (shown in the app's import history), e.g. Inventar 2024.xlsx"New value: +"The source file's name (shown in the app's import history), e.g. Inventar 2024.xlsx"
    • changedInput schema / properties / rows / description
      Previous value: -"The data rows you built from your user's file, cells as strings, header row left out. At most 1000 rows per call"New value: +"The data rows of the source file, cells as strings, header row left out. At most 1000 rows per call"
    • changedOutput schema / properties / blockers / items / properties / rows / description
      Previous value: -"1-based positions in the rows you sent"New value: +"1-based positions in the rows passed"
    • changedOutput schema / properties / done / description
      Previous value: -"false: call again with exactly the same arguments and clientRequestId to continue"New value: +"false: the run stopped early; the same call with the same arguments and clientRequestId continues it"
    • changedOutput schema / properties / notes / description
      Previous value: -"Tell your user these"New value: +"Notes on the plan's outcome"
    • changedOutput schema / properties / planHash / description
      Previous value: -"Pass to run_import with the SAME arguments; it changes when the rows or the organization's answers change"New value: +"run_import takes it with the SAME arguments; it changes when the rows or the organization's answers change"
    • changedOutput schema / properties / problems / items / properties / row / description
      Previous value: -"1-based position in your rows"New value: +"1-based position in the rows passed"
    • changedOutput schema / properties / toCreate / description
      Previous value: -"What the import itself would create by name — usually a typo when you created the structure first"New value: +"What the import itself would create by name — usually a typo when the structure was created first"
    • changedOutput schema / properties / webUrl / description
      Previous value: -"The app's import history — give your user this link; they can also undo the import there"New value: +"The app's import history, where the import can also be undone"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: writes nothing on planChanged, resumable batches with done:false that never duplicate, batch identity tied to clientRequestId, attribution of created items to the connected user with "(via AI agent)", visibility in the app's import history with a webUrl, and undoability. The continuation semantics are explicitly scoped to the same clientRequestId, which is consistent with idempotentHint=false (a new id starts a new batch).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core instruction and dense with useful detail, with no filler sentences. The clientRequestId behavior is stated in three overlapping places (initial mention, the done:false sentence, and the batch-identity sentence), which is a small redundancy for a single-paragraph description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, non-idempotent, 8-parameter write tool, it covers the prerequisites, failure mode, resumption protocol, side effects, and post-run visibility. Return shape is partly covered (done:false, planChanged, container column echo) even though an output schema exists, so nothing an agent needs to invoke it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning to the two hardest parameters: planHash is the guard against drift in rows or organizational answers, and clientRequestId defines batch identity (continue vs. new batch) and is still validated against planHash. It also notes that a container column causes placements and stock groups to be echoed back.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Run an import") and immediately anchors it to the sibling: "the SAME arguments as plan_import, plus its planHash and a clientRequestId". An agent can distinguish executing a plan from creating one without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The dependency on plan_import is made clear via the required planHash, and the description specifies what happens when the plan is stale (returns planChanged, writes nothing) and how to resume (same arguments plus same clientRequestId). It also states the manager-role prerequisite. It stops short of an explicit "always call plan_import first" instruction or a when-not-to-use statement, so not a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources