Skip to main content
Glama

Optional: Order status

get_order
Read-onlyIdempotent

Retrieve an order's current status and human approval decision, plus amendments, credit notes, and ERP hand-off details when delivery issues occur.

Instructions

Current status of an order (ordered, pending_approval, refused, rejected, expired, expired_cutoff) and any human decision. Only orders under your own mandate: send your Authorization: Bearer header (or agent_token). Returns the order (schema /schemas/order.json) with approval {by, approved, note, at} once a human decided, a fresh receipt_jws, and agent_claim (the rationale, labelled unverified). After delivery problems it carries amendments[] from Valio (short pick, delay, substitution at pick, cancelled line; status pending_buyer waits for the buyer, ask-tier for their human, not you) and credit_notes[]. erp: the hand-off to Valio Aimo's order system; erp.simulated / status "simulated" / SIM- id means placed with Sous, Valio hand-off simulated in this demo (no real order reached Valio).

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": {
      "order_id": "<order_id>"
    },
    "name": "get_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
order_idYes
agent_tokenNo

Output Schema

NameRequiredDescriptionDefault
idYes
erpNoHand-off to Valio Aimo's order system (unsigned): {adapter: stub|http, simulated, status: pending|sent|confirmed|simulated|failed, confirmation_id, note, ...}. simulated=true (status 'simulated', confirmation_id 'SIM-...'): no real order was sent to Valio Aimo (no order API in this demo); describe the order as 'placed with Sous; Valio hand-off simulated in this demo', never as confirmed by Valio.
buyerYes
linesYes
statusYes
agent_idYes
approvalNo
decisionYes
quote_idYes
order_urlYes
amendmentsNoValio's post-order exceptions (short_pick, delay, substitution_at_pick, cancel_line), each {id, kind, line, reason, tier, findings[], status: applied|pending_buyer|accepted|rejected, effect, resolution, jws (typ sous-amendment+jws)}
created_atYes
mandate_idYes
updated_atYes
agent_claimNoget_order: the agent's rationale, labelled unverified
receipt_jwsYes
approval_urlNo
credit_notesNoCredit (or extra charge) lines from amendments
total_ex_vatYes
delivery_dateYes
total_inc_vatYes
agent_rationaleNo
idempotency_keyNo
requested_delivery_dateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description goes well beyond them: it requires a Bearer header or agent_token, explains that receipt_jws is freshly issued, that agent_claim is 'labelled unverified', and that erp.simulated / SIM- ids mean the Valio hand-off is faked in this demo. That is genuinely useful behavioural context, though the Valio/Sous/ask-tier jargon is not defined.

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

Conciseness3/5

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

The first sentence is front-loaded and clear, but the rest is a dense run-on with stacked parentheticals and semicolon chains ('short pick, delay, substitution at pick, cancelled line; status pending_buyer waits for the buyer, ask-tier for their human, not you'). Most content is substantive, but the structure impedes scanning.

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 read tool with an output schema, this covers the important gaps: authentication, ownership scoping, the shape of the human-decision block, amendments and credit notes, and the demo/simulated-ERP caveat. It omits what happens when the order is not under your mandate (error vs empty), which is the main remaining hole.

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?

Schema description coverage is 0%, so the description carries the burden: it explains agent_token's role as an alternative credential to the Authorization header, but says nothing about order_id's expected format or scope beyond 'your own mandate'. Partial compensation only.

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

Purpose4/5

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

Opens with a specific verb+resource: 'Current status of an order', and enumerates the status values plus the human-decision payload. It does not distinguish itself from the nearby sibling get_standing_order, which an agent could plausibly confuse with a regular order lookup, so it stops short of a 5.

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

Usage Guidelines3/5

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

Gives a real constraint ('Only orders under your own mandate') and an operational instruction about how to authenticate, plus a note that pending_buyer/ask-tier states belong to the buyer's human, not the agent. It never states when to prefer this over a sibling such as get_standing_order or list-based lookups, so usage is implied rather than directed.

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