Skip to main content
Glama

Prepare checkout (quote)

prepare_checkout
Read-only

Validate items, stock, address and compute the exact total (auto vouchers + free shipping). Returns a summary and a quote_token valid 30 minutes. Does NOT create an order.

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": {
      "items": "<items>",
      "customer": "<customer>",
      "shipping_address": "<shipping_address>"
    },
    "name": "prepare_checkout"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoOptional note for the shop
itemsYes
customerYes
gift_skuNoSKU of the free gift the user picked, when the quote's giftOffer says eligible
voucher_codesNoDiscount codes the user has (automatic vouchers are applied anyway; invalid codes are reported, not applied)
payment_methodNocod = cash on delivery · bank = bank transfer QR · vnpay = VNPAY payment linkcod
shipping_methodNostandard = free nationwide · express = same-day Grab, TP.HCM only (send lat/lng), fee shown in the quotestandard
shipping_addressYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the description's extra value is the quote_token lifetime (30 minutes) and the explicit confirmation of no order side effect. It does not describe what happens on validation failure (e.g. out-of-stock item, invalid address) beyond the token contract.

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

Conciseness5/5

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

Three sentences, no filler: capability first, return contract second, negative boundary last. Every sentence adds information an agent needs.

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 an 8-parameter tool with nested objects and no output schema, the description still covers the return contract (summary + time-limited quote_token) and the non-mutating nature. Failure modes and the required sequencing to place_order remain implicit.

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 63% and the schema descriptions are unusually rich (enums for payment/shipping_method, address field semantics, SKU format). The description only adds that vouchers are applied automatically and standard shipping is free, which modestly clarifies voucher_codes and shipping_method. Baseline 3 is appropriate since the schema carries most of the meaning.

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 specific verbs and resources: validates items/stock/address, computes the exact total including auto vouchers and free shipping, and returns a summary plus a quote_token. The closing line 'Does NOT create an order' sharply separates it from place_order and create_cart_link.

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

Usage Guidelines4/5

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

The negative exclusion ('Does NOT create an order') and the 30-minute token TTL make the pre-order role clear, implying place_order is the follow-up step. It stops short of naming the alternative explicitly or stating when a quote can be skipped.

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