Skip to main content
Glama

Get cart

get_cart
Read-onlyIdempotent

Read the current shopping cart, including line items, quantities, unit prices, line totals, and overall totals, so you can verify contents before making or confirming any changes.

Instructions

Read the shopping cart: each line with productId, cartItemId, kind (product or bag), quantity, unit price (per item or per kg) and lineTotal, plus the totals (products, bags, deposit, delivery, discounts and grandTotal, the amount to pay). Use it to check current quantities before changing them and to verify any uncertain change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "customerAuthenticated": {
      -            "type": "boolean"
      -          },
      -          "items": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "cartItemId": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 200,
      -                      "minLength": 1,
      -                      "pattern": "^[^\\s\\x00-\\x1f\\x7f]+$",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "name": {
      -                  "minLength": 1,
      -                  "type": "string"
      -                },
      -                "price": {
      -                  "additionalProperties": false,
      -                  "properties": {
      -                    "amount": {
      -                      "anyOf": [
      -                        {
      -                          "additionalProperties": false,
      -                          "properties": {
      -                            "currency": {
      -                              "const": "EUR",
      -                              "type": "string"
      -                            },
      -                            "minorUnits": {
      -                              "maximum": 9007199254740991,
      -                              "minimum": 0,
      -                              "type": "integer"
      -                            }
      -                          },
      -                          "required": [
      -                            "currency",
      -                            "minorUnits"
      -                          ],
      -                          "type": "object"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ]
      -                    },
      -                    "basis": {
      -                      "enum": [
      -                        "unit",
      -                        "line",
      -                        "unknown"
      -                      ],
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "amount",
      -                    "basis"
      -                  ],
      -                  "type": "object"
      -                },
      -                "productId": {
      -                  "maxLength": 200,
      -                  "minLength": 1,
      -                  "pattern": "^\\d+$",
      -                  "type": "string"
      -                },
      -                "quantity": {
      -                  "oneOf": [
      -                    {
      -                      "additionalProperties": false,
      -                      "properties": {
      -                        "quantity": {
      -                          "additionalProperties": false,
      -                          "properties": {
      -                            "unit": {
      -                              "enum": [
      -                                "un",
      -                                "kg",
      -                                "g",
      -                                "l",
      -                                "ml"
      -                              ],
      -                              "type": "string"
      -                            },
      -                            "value": {
      -                              "minimum": 0,
      -                              "type": "number"
      -                            }
      -                          },
      -                          "required": [
      -                            "value",
      -                            "unit"
      -                          ],
      -                          "type": "object"
      -                        },
      -                        "status": {
      -                          "const": "known",
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "status",
      -                        "quantity"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "additionalProperties": false,
      -                      "properties": {
      -                        "rawText": {
      -                          "type": [
      -                            "string",
      -                            "null"
      -                          ]
      -                        },
      -                        "reason": {
      -                          "enum": [
      -                            "missing",
      -                            "unsupported_unit",
      -                            "unrecognized_format",
      -                            "invalid_value"
      -                          ],
      -                          "type": "string"
      -                        },
      -                        "status": {
      -                          "const": "unknown",
      -                          "type": "string"
      -                        },
      -                        "value": {
      -                          "anyOf": [
      -                            {
      -                              "minimum": 0,
      -                              "type": "number"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ]
      -                        }
      -                      },
      -                      "required": [
      -                        "status",
      -                        "value",
      -                        "rawText"
      -                      ],
      -                      "type": "object"
      -                    }
      -                  ]
      -                }
      -              },
      -              "required": [
      -                "productId",
      -                "cartItemId",
      -                "name",
      -                "quantity",
      -                "price"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "total": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "currency": {
      -                    "const": "EUR",
      -                    "type": "string"
      -                  },
      -                  "minorUnits": {
      -                    "maximum": 9007199254740991,
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  }
      -                },
      -                "required": [
      -                  "currency",
      -                  "minorUnits"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "required": [
      -          "customerAuthenticated",
      -          "items",
      -          "total"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "enum": [
      -          "success",
      -          "empty",
      -          "partial"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "data"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "anyOf": [
      -              {
      -                "enum": [
      -                  "invalid_data",
      -                  "invalid_input",
      -                  "not_authenticated",
      -                  "upstream_unavailable",
      -                  "not_found",
      -                  "sale_rules_unknown",
      -                  "quantity_below_minimum",
      -                  "cart_change_rejected",
      -                  "cart_change_unconfirmed",
      -                  "cache_unavailable",
      -                  "order_details_unavailable",
      -                  "cancelled",
      -                  "deadline_exceeded",
      -                  "server_closed",
      -                  "queue_full"
      -                ],
      -                "type": "string"
      -              },
      -              {
      -                "enum": [
      -                  "internal_error",
      -                  "invalid_result"
      -                ],
      -                "type": "string"
      -              }
      -            ]
      -          },
      -          "issues": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "code": {
      -                  "type": "string"
      -                },
      -                "path": {
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "path",
      -                "code"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "message": {
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "retryable": {
      -            "type": "boolean"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message",
      -          "retryable"
      -        ],
      -        "type": "object"
      -      },
      -      "mutation": {
      -        "oneOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "outcome": {
      -                "const": "not_applied",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "outcome"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "outcome": {
      -                "const": "unknown",
      -                "type": "string"
      -              },
      -              "recovery": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "action": {
      -                    "const": "get_cart",
      -                    "type": "string"
      -                  },
      -                  "automaticReplay": {
      -                    "const": false,
      -                    "type": "boolean"
      -                  }
      -                },
      -                "required": [
      -                  "action",
      -                  "automaticReplay"
      -                ],
      -                "type": "object"
      -              }
      -            },
      -            "required": [
      -              "outcome",
      -              "recovery"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "status": {
      -        "const": "error",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "customerAuthenticated": {
      +            "type": "boolean"
      +          },
      +          "items": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "cartItemId": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 200,
      +                      "minLength": 1,
      +                      "pattern": "^[^\\s\\x00-\\x1f\\x7f]+$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "kind": {
      +                  "enum": [
      +                    "product",
      +                    "bag"
      +                  ],
      +                  "type": "string"
      +                },
      +                "lineTotal": {
      +                  "anyOf": [
      +                    {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "currency": {
      +                          "const": "EUR",
      +                          "type": "string"
      +                        },
      +                        "minorUnits": {
      +                          "maximum": 9007199254740991,
      +                          "minimum": 0,
      +                          "type": "integer"
      +                        }
      +                      },
      +                      "required": [
      +                        "currency",
      +                        "minorUnits"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "name": {
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "price": {
      +                  "anyOf": [
      +                    {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "amount": {
      +                          "additionalProperties": false,
      +                          "properties": {
      +                            "currency": {
      +                              "const": "EUR",
      +                              "type": "string"
      +                            },
      +                            "minorUnits": {
      +                              "maximum": 9007199254740991,
      +                              "minimum": 0,
      +                              "type": "integer"
      +                            }
      +                          },
      +                          "required": [
      +                            "currency",
      +                            "minorUnits"
      +                          ],
      +                          "type": "object"
      +                        },
      +                        "per": {
      +                          "enum": [
      +                            "item",
      +                            "piece",
      +                            "kg",
      +                            "l"
      +                          ],
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "amount",
      +                        "per"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "productId": {
      +                  "maxLength": 200,
      +                  "minLength": 1,
      +                  "pattern": "^\\d+$",
      +                  "type": "string"
      +                },
      +                "quantity": {
      +                  "oneOf": [
      +                    {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "quantity": {
      +                          "additionalProperties": false,
      +                          "properties": {
      +                            "unit": {
      +                              "enum": [
      +                                "un",
      +                                "kg",
      +                                "g",
      +                                "l",
      +                                "ml"
      +                              ],
      +                              "type": "string"
      +                            },
      +                            "value": {
      +                              "minimum": 0,
      +                              "type": "number"
      +                            }
      +                          },
      +                          "required": [
      +                            "value",
      +                            "unit"
      +                          ],
      +                          "type": "object"
      +                        },
      +                        "status": {
      +                          "const": "known",
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "status",
      +                        "quantity"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "rawText": {
      +                          "type": [
      +                            "string",
      +                            "null"
      +                          ]
      +                        },
      +                        "reason": {
      +                          "enum": [
      +                            "missing",
      +                            "unsupported_unit",
      +                            "unrecognized_format",
      +                            "invalid_value"
      +                          ],
      +                          "type": "string"
      +                        },
      +                        "status": {
      +                          "const": "unknown",
      +                          "type": "string"
      +                        },
      +                        "value": {
      +                          "anyOf": [
      +                            {
      +                              "minimum": 0,
      +                              "type": "number"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ]
      +                        }
      +                      },
      +                      "required": [
      +                        "status",
      +                        "value",
      +                        "rawText"
      +                      ],
      +                      "type": "object"
      +                    }
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "productId",
      +                "cartItemId",
      +                "name",
      +                "kind",
      +                "quantity",
      +                "price",
      +                "lineTotal"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "totals": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "bags": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "currency": {
      +                        "const": "EUR",
      +                        "type": "string"
      +                      },
      +                      "minorUnits": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "minorUnits"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "delivery": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "currency": {
      +                        "const": "EUR",
      +                        "type": "string"
      +                      },
      +                      "minorUnits": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "minorUnits"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "deposit": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "currency": {
      +                        "const": "EUR",
      +                        "type": "string"
      +                      },
      +                      "minorUnits": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "minorUnits"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "discounts": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "currency": {
      +                        "const": "EUR",
      +                        "type": "string"
      +                      },
      +                      "minorUnits": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "minorUnits"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "grandTotal": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "currency": {
      +                        "const": "EUR",
      +                        "type": "string"
      +                      },
      +                      "minorUnits": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "minorUnits"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "products": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "currency": {
      +                        "const": "EUR",
      +                        "type": "string"
      +                      },
      +                      "minorUnits": {
      +                        "maximum": 9007199254740991,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "minorUnits"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "products",
      +              "bags",
      +              "deposit",
      +              "delivery",
      +              "discounts",
      +              "grandTotal"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "customerAuthenticated",
      +          "items",
      +          "totals"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "enum": [
      +          "success",
      +          "empty",
      +          "partial"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "data"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "anyOf": [
      +              {
      +                "enum": [
      +                  "invalid_data",
      +                  "invalid_input",
      +                  "not_authenticated",
      +                  "upstream_unavailable",
      +                  "not_found",
      +                  "sale_rules_unknown",
      +                  "quantity_below_minimum",
      +                  "cart_change_rejected",
      +                  "cart_change_unconfirmed",
      +                  "cache_unavailable",
      +                  "order_details_unavailable",
      +                  "cancelled",
      +                  "deadline_exceeded",
      +                  "server_closed",
      +                  "queue_full",
      +                  "browser_unavailable"
      +                ],
      +                "type": "string"
      +              },
      +              {
      +                "enum": [
      +                  "internal_error",
      +                  "invalid_result"
      +                ],
      +                "type": "string"
      +              }
      +            ]
      +          },
      +          "issues": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "code": {
      +                  "type": "string"
      +                },
      +                "path": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "path",
      +                "code"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "message": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message",
      +          "retryable"
      +        ],
      +        "type": "object"
      +      },
      +      "mutation": {
      +        "oneOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "outcome": {
      +                "const": "not_applied",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "outcome"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "outcome": {
      +                "const": "unknown",
      +                "type": "string"
      +              },
      +              "recovery": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "action": {
      +                    "const": "get_cart",
      +                    "type": "string"
      +                  },
      +                  "automaticReplay": {
      +                    "const": false,
      +                    "type": "boolean"
      +                  }
      +                },
      +                "required": [
      +                  "action",
      +                  "automaticReplay"
      +                ],
      +                "type": "object"
      +              }
      +            },
      +            "required": [
      +              "outcome",
      +              "recovery"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "status": {
      +        "const": "error",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observedv0.2.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is fully covered by structured data. The description adds little behavioral detail beyond what annotations and the output schema provide; its main extra is workflow context (verify before/after changes), which is useful but not a new behavioral trait.

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?

The description is front-loaded with the core purpose and is only two sentences. However, the long enumeration of return fields is partly redundant with the existing output schema, so not every clause fully earns its place.

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?

For a simple, zero-parameter read tool with rich annotations and an output schema, the description covers what is returned and when to call it. Nothing an agent needs to invoke it 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 has zero parameters, so the baseline is 4. The description correctly adds no parameter syntax or constraints, and there are no parameters for it to compensate for.

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 states a precise verb ('Read') and resource ('the shopping cart'), then enumerates exactly what the read returns (line items and totals). This clearly distinguishes it from mutation siblings like add_cart_item, set_cart_item_quantity, and remove_cart_item without needing to name them.

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 explicit when-to-use guidance: 'to check current quantities before changing them' and 'to verify any uncertain change.' That directly points to the mutation siblings and the workflow context. It does not name alternatives explicitly or state when-not-to-use, so a 4 rather than a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.