Skip to main content
Glama

get_purchase_turn

Read-onlyIdempotent

Read a purchase turn that was still running

Reads back a turn from POST /buy-with-saved-card that came back state: running. Poll every few seconds until state is done or failed; the response has the same shape as the POST.

A failed confirm may still have placed the order. Read GET /get-purchase-conversation before sending it again.

Input Schema

NameRequiredDescriptionDefault
turn_idYesThe `turn_id` from `POST /buy-with-saved-card`.

Output Schema

NameRequiredDescriptionDefault
cartNoThe most recently shown cart.
noteNoThe next step.
cartsNoEvery open cart in the conversation, oldest first.
errorNoPresent when `state` is `failed`.
replyNoThe shopping assistant's turn as prose, ready to show the holder.
stateNo`running` means the turn is still talking to the merchant; the fields below appear once it is `done`. One of: running, done, failed.
statusNoWhat to do next. `needs_input`: a question or a cart waiting on a confirm. `awaiting_approval`: send `approval_url` to the holder, then repeat the same confirm. `in_progress`: the order is already being placed; read `GET /get-purchase-conversation` instead of confirming again. `order_placed`. `declined`: see `decline_code`. `conflict`: nothing ran, see `error_code` and confirm the fresh cart's hash. Never branch on `reply`. One of: needs_input, awaiting_approval, in_progress, order_placed, declined, conflict.
catalogNoThe last product search. Empty on a turn that did not search again, so keep the previous one.
turn_idNoThis turn's id. Poll `GET /get-purchase-turn` with it while `state` is `running`.
order_idNoSet when this turn placed an order.
unmatchedNoThings asked for that did not make it into a cart, with a reason. Show these rather than guessing from `reply`.
card_last4NoThe saved card that paid, for naming it to the holder.
created_atNoMilliseconds since the epoch.
error_codeNoOn `conflict`: `cart_changed`, `turn_in_progress`, `delivery_address_changed`, or `delivery_address_bound_after_cart`.
approval_urlNoSend to the holder when `status` is `awaiting_approval`. Never open it yourself.
decline_codeNoThe machine reason behind `declined`, e.g. `items_unavailable`.
charge_statusNoWhether money moved: `none`, `confirming`, `settled`, or `unknown` (do not retry; read the conversation). One of: none, confirming, settled, unknown, .
conversation_idNoSend it back on every follow-up and on the confirm.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already carry the safety profile (readOnly, idempotent, non-destructive, not open-world), yet the description still adds real behavior: the response matches the POST shape, the polling cadence, and the important caveat that a failed confirm may still have placed the order. It does not cover rate limits or what states other than running/done/failed look like, so it stops just short of exhaustive.

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 tight paragraphs, front-loaded with the core read, then the polling rule, then the failure warning. No sentence is redundant and each advances correct usage.

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?

An output schema exists, so return values need not be enumerated — and the description's note that the response mirrors the POST is a useful pointer rather than padding. For a one-parameter polling read with full annotation coverage, nothing an agent needs to call it 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 100% and the single parameter already documents its provenance in the schema description. The prose adds no syntax, format, or constraint beyond what the schema provides, which is the expected baseline when the schema does the heavy lifting.

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 ('Read') and resource ('a purchase turn') scoped precisely to turns from POST /buy-with-saved-card that returned state: running. It also implicitly distinguishes itself from buy_with_saved_card (the creator) and names get_purchase_conversation as a related read, so an agent can place it among siblings without opening schemas.

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?

Gives an explicit operational loop: poll every few seconds until state is done or failed. It also names the alternative action and its precondition — read GET /get-purchase-conversation before resending a failed confirm. When-to-use, when-to-stop, and the alternative are all spelled out.

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