Skip to main content
Glama

Bafan

Get cart

get_cart
Idempotent

Read the cart items and subtotal. For a signed-in user, a previous guest cart key merges that guest cart into the account cart.

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
cart_keyNoGuest carts only; omit it when the account is connected. Private tool input. Copy the key from an earlier tool result, the cart_key query parameter of a payment link, or the last segment of a /shop/mcp-checkout/ link already in the chat. Keep it out of shopper replies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

The readOnlyHint=false annotation is counter-intuitive for a tool whose name starts with 'get', and the description explains why: passing a guest cart_key merges that cart into the account cart, a real mutation. That is genuine value beyond the annotations. It stops short of describing what happens to the guest cart afterwards or what an unauthenticated caller receives.

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?

Two sentences, no filler. The read purpose comes first and the surprising merge side effect immediately follows, so the most decision-relevant fact is front-loaded.

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 single-optional-parameter read tool with no output schema, this covers the essentials: what is returned at a high level ('items and subtotal') and the one side effect that changes how an agent should call it. The exact response shape and non-item fields are left unspecified, which is a minor gap given no output schema exists.

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?

Schema coverage is 100% and already documents the 43-character key, where to copy it from, and keeping it out of shopper replies. The description adds the missing 'so what': what supplying the key during a signed-in session actually does. That is meaning beyond the schema, though the merge-failure case is not addressed.

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?

States a specific verb and resource: 'Read the cart items and subtotal.' That is more precise than a name restatement, but it never names a sibling (checkout_cart, create_cart, set_cart_quantity) to explain how it differs from the other cart tools.

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?

The description gives conditional guidance for the cart_key argument (omit it when the account is connected, pass it for a guest cart) and explains the resulting merge. It does not say when to reach for this tool rather than checkout_cart or create_cart, so the when-to-use guidance is only implied.

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