Skip to main content
Glama

get_checkout_state

Read-onlyIdempotent

Read the current state of a cart created with create_cart: status, lines, totals, selected shipping, when it was previewed, its order if one exists and a pointer to get_trust_receipt. Read-only: it changes nothing and does not open any approval. Use it to resume a purchase; for UCP checkouts use ucp_get_checkout. Checkout guide: read the MCP resource trusteed://guides/checkout.

Input Schema

NameRequiredDescriptionDefault
cart_idYesThe cart id returned by create_cart (the checkout session id, a valid UUID).
agent_keyNoSandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": true,
      -  "properties": {
      -    "actor": {
      -      "enum": [
      -        "buyer",
      -        "merchant",
      -        "agent"
      -      ],
      -      "type": "string"
      -    },
      -    "blocking_expires_at": {
      -      "description": "ISO-8601 UTC instant at which the pending approval stops being valid. Not the checkout session validity: that is expires_at.",
      -      "type": "string"
      -    },
      -    "blocking_requirement": {
      -      "enum": [
      -        "none",
      -        "merchant_approval",
      -        "merchant_rejected",
      -        "buyer_mandate_approval",
      -        "buyer_payment",
      -        "preview",
      -        "session_closed",
      -        "unknown"
      -      ],
      -      "type": "string"
      -    },
      -    "checkout_session_id": {
      -      "type": "string"
      -    },
      -    "currency": {
      -      "type": "string"
      -    },
      -    "expires_at": {
      -      "type": "string"
      -    },
      -    "expires_in_seconds": {
      -      "type": "number"
      -    },
      -    "lines": {
      -      "items": {
      -        "additionalProperties": true,
      -        "properties": {
      -          "line_price_cents": {
      -            "type": "number"
      -          },
      -          "name": {
      -            "type": "string"
      -          },
      -          "product_id": {
      -            "type": "string"
      -          },
      -          "quantity": {
      -            "type": "number"
      -          },
      -          "unit_price_cents": {
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "quantity",
      -          "unit_price_cents",
      -          "line_price_cents"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "next_tool": {
      -      "type": "string"
      -    },
      -    "order": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "external_order_id": {
      -          "type": "string"
      -        },
      -        "order_id": {
      -          "type": "string"
      -        },
      -        "status": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "order_id",
      -        "status"
      -      ],
      -      "type": "object"
      -    },
      -    "other_requirements": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "previewed_at": {
      -      "type": "string"
      -    },
      -    "reason": {
      -      "type": "string"
      -    },
      -    "receipt": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "checkout_session_id": {
      -          "type": "string"
      -        },
      -        "tool": {
      -          "const": "get_trust_receipt",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "tool",
      -        "checkout_session_id"
      -      ],
      -      "type": "object"
      -    },
      -    "shipping": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "handle": {
      -          "type": "string"
      -        },
      -        "price_cents": {
      -          "type": "number"
      -        },
      -        "title": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "status": {
      -      "type": "string"
      -    },
      -    "suggested_next_tool": {
      -      "type": "string"
      -    },
      -    "totals": {
      -      "items": {
      -        "additionalProperties": true,
      -        "properties": {
      -          "amount_cents": {
      -            "type": "number"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "type",
      -          "amount_cents"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "url": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "checkout_session_id",
      -    "status",
      -    "currency",
      -    "lines",
      -    "totals",
      -    "blocking_requirement"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower; the description reinforces read-only and adds a genuine extra ('does not open any approval'), which no annotation conveys. It also enumerates what state is exposed (status, lines, totals, shipping, preview time, order, receipt pointer), compensating for the absent output schema.

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?

Three compact sentences, front-loaded with the purpose before routing and the guide reference. Slightly dense with the field enumeration, but no sentence is filler.

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?

With rich annotations and no output schema, the description carries the burden well: it lists the returned state, the safety profile, the alternative tool, and a documentation pointer. Nothing an agent needs to invoke 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 100% and both parameters are fully documented in the schema, so the baseline is 3. The description's reference to 'a cart created with create_cart' only restates the schema's own note about cart_id's origin and adds no syntax or format detail.

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+resource ('Read the current state of a cart') and enumerates the returned fields, so the agent knows exactly what comes back. It also explicitly contrasts itself with ucp_get_checkout, making sibling disambiguation immediate.

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 the positive condition ('Use it to resume a purchase') and names the alternative with its selector ('for UCP checkouts use ucp_get_checkout'). It even points to the checkout guide resource for deeper context.

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