Skip to main content
Glama

View cart

view_cart
Read-onlyIdempotent

Show the lines in the user's cart with qty, size, fabric and subtotal. It is the same server-side cart the human sees at allover.art/cart when signed in, so items they added in the browser appear here too. Use it to get the zero-based line index that update_cart_item takes — re-read after removing a line, since later indexes shift. Prices are as added; for the payable total with fresh prices, promo and shipping use get_order_preview. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "view_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
errorNoPresent instead of a cart when the call failed (bad index, unavailable size, ...).
itemsNoCart lines in index order — this index is what update_cart_item takes.
currencyNo
subtotalNoSum of price x qty over all lines, USD.
checkout_urlNoCart page URL for the human.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / items / items / properties / set
      Added value: +{
      +  "description": "Only on a line of a matching set: the pair it belongs to (both lines share key) and which part it is.",
      +  "properties": {
      +    "key": {
      +      "type": "string"
      +    },
      +    "role": {
      +      "description": "top or bottom.",
      +      "type": "string"
      +    },
      +    "title": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / items / description
      Previous value: -"Cart lines in index order — this index is what set_cart_quantity/cart_update/cart_remove take."New value: +"Cart lines in index order — this index is what update_cart_item takes."
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "checkout_url": {
      +      "description": "Cart page URL for the human.",
      +      "type": "string"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Present instead of a cart when the call failed (bad index, unavailable size, ...).",
      +      "type": "string"
      +    },
      +    "items": {
      +      "description": "Cart lines in index order — this index is what set_cart_quantity/cart_update/cart_remove take.",
      +      "items": {
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "currency": {
      +            "type": "string"
      +          },
      +          "custom": {
      +            "description": "True when the line is a user-generated custom print.",
      +            "type": "boolean"
      +          },
      +          "fabric": {
      +            "type": "string"
      +          },
      +          "good_id": {
      +            "type": "integer"
      +          },
      +          "price": {
      +            "type": "number"
      +          },
      +          "product": {
      +            "type": "string"
      +          },
      +          "qty": {
      +            "type": "integer"
      +          },
      +          "size": {
      +            "type": "string"
      +          },
      +          "title": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "subtotal": {
      +      "description": "Sum of price x qty over all lines, USD.",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent and non-destructive, but the description adds substantive context beyond them: the cart is the same server-side cart the human sees at allover.art/cart when signed in, so browser-added items appear here, and prices shown are as-added rather than fresh. The index-shifting warning after a removal is a behavioral trait the annotations cannot express.

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?

Four sentences, each earning its place: what it returns, whose cart it is, why to call it, and how pricing differs from the preview tool. The read-only confirmation is front-loaded at the end as a short tag rather than buried, and there is no restating of the name or title.

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 definition instead spends its words on the ambiguities that matter: cart identity, price freshness, and index invalidation. Nothing an agent needs to call this zero-parameter read correctly is missing.

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?

The tool takes zero parameters, so the schema imposes no burden and the baseline expectation is already met. The description still adds meaning by explaining that the line index surfaced by this call is what update_cart_item consumes, connecting the output to a downstream parameter.

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 and resource ("Show the lines in the user's cart") plus the exact fields returned (qty, size, fabric, subtotal). It also explicitly contrasts itself with get_order_preview for payable totals and update_cart_item for line indexes, so an agent can place it among siblings without opening any schema.

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 explicit when-to-use (retrieve the zero-based line index that update_cart_item takes) and an explicit operational rule (re-read after removing a line because later indexes shift). It also names the alternative tool and the condition that selects it: use get_order_preview for the payable total with fresh prices, promo and shipping.

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