Skip to main content
Glama

elevai Commerce Demo

Bestellung stornieren

cancel_order
DestructiveIdempotent

Storniert eine eigene Bestellung, die noch offen oder reserviert ist. Eine Reservation bei PostFinance wird dabei sofort freigegeben (statt erst nach Ablauf der Reservationsfrist). Nur auf ausdruecklichen Wunsch der Person: erst ohne confirmed_in_chat aufrufen — das Werkzeug nennt, was storniert wuerde —, die Person fragen, und erst nach ihrem Ja mit confirmed_in_chat: true erneut aufrufen. Nur Bestellungen, deren Nummer die Person ausdruecklich nennt; sagt sie «alle» oder nennt keine Nummer, die stornierbaren Nummern aufzaehlen und sie bitten, die gewuenschten Nummern zu nennen. Verlangt das Handle aus create_order oder list_orders (fuer aeltere Bestellungen aus anderen Gespraechen: zuerst list_orders).

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_handle": "<order_handle>"
    },
    "name": "cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNoOptional: Grund in den Worten der Person, kurz.
order_handleYes
confirmed_in_chatNoNur true, wenn die Person der Stornierung im Gespraech ausdruecklich zugestimmt hat. Nie selbst setzen.

Output Schema

NameRequiredDescriptionDefault
retryNo
totalNo
statusNo
currencyNo
cancelledNo
order_handleNo
already_cancelledNo
reservation_releasedNo
confirmation_requiredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is known. The description still earns credit by disclosing the concrete destruction target and the PostFinance reservation-release side effect plus the mandatory confirmation protocol. It does not describe the return payload, but an output schema exists, so that gap is minor with annotations present.

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 action and its side effect, then the consent protocol, then the handle sourcing rule — a logical order with no filler sentences. It is dense and slightly long, but nearly every clause carries operational constraints.

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 two-phase-confirmation mutation, the description covers triggering conditions, consent flow, scope limits, prerequisite handle sourcing and the preview behavior of the unconfirmed call. With an output schema covering return values and annotations covering safety, nothing an agent needs to call this correctly is missing.

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 coverage is 67% and confirmed_in_chat and reason are already documented in the schema, so the baseline sits near 3. The description does add real meaning for the undocumented order_handle (where it comes from, and to call list_orders first for older orders) and reinforces the confirmed_in_chat consent rule, but says nothing about the optional reason parameter.

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 ('Storniert eine eigene Bestellung') and narrows scope to orders that are 'noch offen oder reserviert'. It also names the concrete side effect (PostFinance reservation released immediately) and points to create_order/list_orders as the handle sources, so the agent can place it among the siblings without opening a 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?

Explicit when-to-use and when-not: only on the person's express wish, only for order numbers the person names, and if they say 'alle' or name none, the tool says to enumerate cancellable numbers and ask instead. The two-step call sequence (first without confirmed_in_chat, then after consent with true) is spelled out unambiguously.

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