Create order
create_orderCreate an order: a request for items or material (any member can order; order managers fulfill). lines holds one entry per thing, each with an optional quantity: "5 Packungen Kopierpapier" is { description: "Packungen Kopierpapier", quantity: 5 }; a specific inventory item is { itemId, quantity } (ids from search_items); "any two of this drill model" is { modelId, quantity: 2 } (search_items rows carry the modelId); "any five from this category" is { categoryId, quantity: 5 } (category ids from get_item_requirements). For a model or category line the store picks the concrete items, and a line with nothing free is allowed. request is free text around it ("für das Schulzimmer 201"); at least one of request / lines / itemIds is required. neededBy is a calendar day ("2026-08-11"); the server has no timezone and does no conversion, so a full timestamp is accepted only WITH an explicit offset ("2026-08-11T00:00:00+02:00"). The legacy neededByAt epoch still works; exactly one of the two. The result echoes neededByAtIso, the day that landed, and webUrl, the new order's page in the web app; orderId is the handle for follow-up calls. deliverToResourceId is the person or location the items go to (ids from search_resources); absent = the connected user. With clientRequestId a repeated call returns the existing order instead of a duplicate; without it every call creates a new order.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | The requested lines, one entry per thing: a specific inventory item, any instance of a model, any item of a category, or free text, each with an optional quantity | |
| itemIds | No | Shorthand for quantity-less inventory item lines; equivalent to lines: [{ itemId }] | |
| request | No | Free-text description of what is needed (at least one of request/lines/itemIds is required) | |
| neededBy | No | When the requester needs it, as a calendar day: "YYYY-MM-DD" (e.g. "2026-08-11"). This server has no timezone and does no conversion, so a relative date ("bis Dienstag") is resolved by the caller. A full timestamp is accepted only WITH an explicit offset ("2026-08-11T00:00:00+02:00"), and its calendar day is taken as seen in that offset; an offset-less timestamp is refused. Passing both neededByAt and neededBy is an error | |
| neededByAt | No | When the requester needs it, as epoch milliseconds at UTC midnight of that day (legacy form of `neededBy`; exactly one of the two) | |
| clientRequestId | No | A unique id for this request (e.g. a UUID). A repeated call with the SAME id returns the existing order instead of creating a duplicate; a new id creates a new order. | |
| deliverToResourceId | No | Person or location resource id to deliver to; absent = the connected user |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Order status | |
| webUrl | No | Link to the new order in the web app, for a person to open; `orderId` is the handle for tool calls | |
| orderId | No | The new order's id | |
| neededByAt | No | The needed-by date that actually landed, epoch milliseconds. Absent when none was passed | |
| targetName | No | Who/where it delivers to | |
| neededByAtIso | No | The same date as a plain calendar day, "YYYY-MM-DD": the day that landed. A DAY, not a moment: the server does no timezone conversion |