Core 3/4 shortcut: Can I order this?
can_i_orderChecks whether a planned purchase is allowed under the buyer’s mandate, returning yes, needs a human, or no with the deciding rules, order lines and quote ID; it places no order.
Instructions
What am I allowed to do? One step: quotes the request live under the mandate (same as request_quote) and answers yes / needs_a_human / no, with the rules that decided, the lines it would order and the quote_id. Places no order. If the answer is yes or needs_a_human, call place_order with quote_id (and an idempotency_key) before expires_at; if no, tell the user why. items as in request_quote (amount in L or KG, several ids).
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": {
"mandate_id": "<mandate_id>",
"delivery_date": "<delivery_date>",
"items": "<items>"
},
"name": "can_i_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| agent_id | No | ||
| rationale | No | ||
| mandate_id | Yes | ||
| agent_token | No | ||
| delivery_date | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | Yes | The rules that decided, in plain words (empty when nothing stood out) | |
| tier | Yes | silent | notify | ask | block | |
| lines | Yes | What would be ordered: product_id, name, quantity, unit, total | |
| answer | Yes | yes: place_order orders it (tier silent or notify); needs_a_human: place_order holds it for the buyer's human (ask); no: the mandate refuses it (block) | |
| options | Yes | How many alternatives the full quote offers (request_quote shows them) | |
| quote_id | Yes | ||
| next_step | Yes | ||
| uncovered | Yes | Amounts the quote can't cover; see options | |
| expires_at | Yes | ||
| total_ex_vat | Yes |