Skip to main content
Glama

Core 3/4 shortcut: Can I order this?

can_i_order

Checks 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

NameRequiredDescriptionDefault
itemsYes
agent_idNo
rationaleNo
mandate_idYes
agent_tokenNo
delivery_dateYes

Output Schema

NameRequiredDescriptionDefault
whyYesThe rules that decided, in plain words (empty when nothing stood out)
tierYessilent | notify | ask | block
linesYesWhat would be ordered: product_id, name, quantity, unit, total
answerYesyes: 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)
optionsYesHow many alternatives the full quote offers (request_quote shows them)
quote_idYes
next_stepYes
uncoveredYesAmounts the quote can't cover; see options
expires_atYes
total_ex_vatYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations it discloses that no order is placed, that a live quote is created (which explains readOnlyHint=false despite the read-like framing), and that the resulting quote_id expires at expires_at and must be paired with an idempotency_key downstream. It does not cover whether repeated calls create duplicate quotes or any rate/cost implications, so it falls short of the top mark.

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?

It is front-loaded with the core question and answer set, then the next-step branching, then the item caveat — every sentence contributes. The telegraphic phrasing ('quotes the request live under the mandate', 'items as in request_quote') is dense enough to border on cryptic, which costs a point.

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

Completeness4/5

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

For a pre-flight check with six parameters and a rich nested item schema, the description covers the intent, the outcome vocabulary, the follow-up call and the quote lifetime; the presence of an output schema means return structure need not be restated. What is missing is guidance on the undocumented top-level params (rationale, agent_token) and the expires_at source.

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

Parameters3/5

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

Top-level schema coverage is 0% (mandate_id, delivery_date, agent_id, agent_token, rationale are undocumented anywhere), so the description carries weight here; it only does so by pointing at request_quote for items and noting 'amount in L or KG, several ids'. That hint is also a simplification of the schema, which defaults to SALES_UNIT and allows ST/Valio unit codes — useful but not a full substitute for the coverage gap.

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?

The description gives a specific verb+resource: it quotes the request live under a mandate and answers yes / needs_a_human / no with the deciding rules, orderable lines and quote_id. It explicitly positions itself against two siblings — 'same as request_quote' for the quoting step and 'places no order' versus place_order — so an agent can place it without opening another schema.

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

Usage Guidelines5/5

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

It spells out the decision tree: yes or needs_a_human means call place_order with quote_id and an idempotency_key before expires_at; no means explain why to the user. It also names the sibling whose item semantics are reused ('items as in request_quote'), leaving nothing to inference about the next action.

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