Skip to main content
Glama

Get cart

get_cart
Read-onlyIdempotent

Returns one cart drawer with every setting assistants can change: its sections (top bar, announcement, banner, timer, reward bar with tiers, line items, product upsells, empty cart, order note, discount code, subtotal, checkout button, express checkout, payment icons, trust badges), order upsells, upgrade offers and the order they stack in. Without an id it returns the live cart. Pass include_style for colors and sizes. update_cart takes changes under the same names. A cart in an A/B test shows ab_test; pass version for the settings of version B, C or D.

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": "get_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoCart id from list_carts. Default: the live cart, or the store's only cart.
versionNoA/B test version. Default A, the live item. B, C and D change only while the test is a draft.
include_styleNoAlso return colors, sizes and custom CSS.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"Cart id from list_carts. Default: the live cart."New value: +"Cart id from list_carts. Default: the live cart, or the store's only cart."
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive, so the safety profile is covered. The description adds genuinely useful behavior: the live-cart default, the A/B version semantics tied to draft state, and the correspondence with update_cart field names. It says nothing about payload size or paging, but for a single-read tool that is a minor gap.

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?

Front-loaded with the return scope, then defaults and the A/B hint, with no filler sentences. The long parenthetical section list is dense but functional, and each sentence carries distinct 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?

For a zero-required-param read tool with a fully described schema and rich annotations, the description covers purpose, defaults, optional flags and A/B behavior. Without an output schema, coverage of the return shape is included via the section enumeration, leaving little an agent must guess.

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%, so all three parameters are already documented, including the id default and the A/B draft-only semantics of version. The description reinforces rather than extends this, adding only the ab_test field hint, so it sits at the baseline for a fully documented schema.

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 ('Returns one cart drawer') and enumerates exactly what the payload contains (sections, order upsells, upgrade offers and their stacking order). The singular-cart scope plus the update_cart naming note makes it distinguishable from list_carts and the mutation siblings.

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?

Explains the default behavior when no id is passed ('returns the live cart'), when to pass include_style, and how to read a cart inside an A/B test via ab_test and version. It flags update_cart as the tool for changes, but gives no explicit when-not-to-use or prerequisite guidance.

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