Skip to main content
Glama

View a cart

get_cart
Read-only

Retrieve live cart state by cart_id: full item list, calculated totals in ZAR, and any customer details stored so far. Call after update_cart to confirm changes are correct before proceeding to create_checkout. Cart expires after 24 hours of inactivity.

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": {
      "cart_id": "<cart_id>"
    },
    "name": "get_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
cart_idYes

Output Schema

NameRequiredDescriptionDefault
itemsYes
cart_idYes
currencyYes
customerYes
total_zarYes
created_atYes
expires_atYes
item_countYes
updated_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive, closed-world, so the safety profile is covered. The description adds meaningful behavior beyond them: live state (not cached), totals denominated in ZAR, and a 24-hour inactivity expiry. It stops short of saying what happens to cart contents on expiry.

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, front-loaded with the core action and return contents, followed by sequencing and then a lifecycle constraint. Nothing is redundant and no sentence could be dropped without losing information.

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?

With an output schema present, the description correctly avoids documenting the response shape in detail while still signaling what to expect. Combined with the sequencing advice and expiry note, an agent has enough to invoke it correctly; only the cart_id format remains uncovered.

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 description coverage is 0% and the single parameter carries no description, so this is the only place an agent learns anything about it. The description only says the cart is retrieved "by cart_id" — the parameter's role, but no format, source, or where to obtain an id.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ("Retrieve live cart state by cart_id") and enumerates what comes back: item list, ZAR totals, and stored customer details. It is clearly distinct from checkout/order retrieval by wording, though it never names those siblings explicitly.

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?

It gives concrete workflow placement: call after update_cart to verify changes, before create_checkout. That is real when-to-use guidance anchored to named tools, but there is no statement of when not to call it or of a cheaper alternative for quick existence checks.

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