Skip to main content
Glama

Preview mobile checkout

checkout_preview
Read-only

Preview checkout fees and final order shape before committing, and obtain the one-time token required for placing the order. Does not submit the order; use after delivery options are selected.

Instructions

Run the read-side of the mobile checkout (sendOrder1 + delivery/payment-group reads) and return a one-time checkout token plus totals. Use after delivery_options/select_pickup_point to preview fees and the final order shape before committing, and to obtain the token that place_order requires. This never submits the order. Requires a non-empty cart. Requires a loaded mobile API access token — check account_status first; if none is loaded, run auth_start, have the user complete the browser sign-in, then auth_exchange with the returned code and state. Note: the mobile submission step (sendOrder3) currently returns HTTP 500 (docs/gap-analysis.md G1/G5) — the known-working submission path is web_place_order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selected_delivery_option_idNoDelivery option id from `delivery_options` to preview that specific delivery method. Omit for the server default.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cartNo
checkoutStateNo
confirmationTokenYes
deliveryPaymentGroupsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description reinforces this by stating 'This never submits the order.' It adds important behavioral context beyond the annotations: the tool requires a non-empty cart, requires a loaded mobile API access token, and the mobile submission step (`sendOrder3`) currently returns HTTP 500. This is exactly the kind of operational caveat an agent needs to avoid a failed call.

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?

The description is dense but well-structured: it front-loads the core function, then gives usage context, prerequisites, and a critical caveat. Every sentence earns its place, though the auth flow explanation is somewhat long. It could be tightened slightly, but the information is all relevant and necessary.

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?

Given the tool's complexity (auth dependency, cart prerequisite, broken submission path, token output), the description covers all the essential context an agent needs to call it correctly. The output schema exists, so return values don't need to be spelled out. The description is complete for a read-side preview tool with a known broken sibling path.

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

Parameters4/5

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

Schema coverage is 100% and the single parameter is already described in the schema. The description adds context by explaining that omitting the parameter uses the server default, which is a useful behavioral nuance. It doesn't need to restate the schema, so a 4 is appropriate for the added value.

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 clearly states the tool's function: it runs the read-side of the mobile checkout, returns a one-time token plus totals, and explicitly notes it never submits the order. It distinguishes itself from the submission path by naming `place_order` and `web_place_order`, and from the earlier `delivery_options`/`select_pickup_point` steps.

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?

The description gives explicit when-to-use guidance: use after `delivery_options`/`select_pickup_point` to preview fees and the final order shape before committing, and to obtain the token that `place_order` requires. It also states prerequisites (non-empty cart, loaded mobile API access token) and provides a fallback auth flow (`auth_start` → browser sign-in → `auth_exchange`). It even warns that the mobile submission path is broken and directs to `web_place_order` as the known-working alternative.

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