Skip to main content
Glama

View cart

view_cart
Read-onlyIdempotent

Show the current contents of the user's cart (the same cart they see in the browser when signed in).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent instead of a cart when the call failed (bad index, unavailable size, ...).
itemsNoCart lines in index order — this index is what set_cart_quantity/cart_update/cart_remove take.
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
    • 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"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint and idempotentHint. The description adds useful context by confirming the cart matches the browser view when signed in, without contradicting annotations.

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?

Single sentence is efficient, front-loaded with the main action, and contains no fluff.

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?

Given zero parameters and an output schema, the description provides sufficient context about the cart contents being browser-consistent. No major gaps.

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?

No parameters exist; base score 4 applies as no additional parameter documentation is needed.

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 action ('show the current contents of the user's cart') and distinguishes it from sibling tools that modify the cart or handle promotions/checkout.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives; usage is implied but not elaborated. Given many related sibling tools, some context would help.

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