Skip to main content
Glama

X402-Broker Universal MCP Gateway & Multi-Agent Swarm Router

get_cart

Read-onlyIdempotent

Retrieve current shopping cart items and totals by cart_id. Example: get_cart(cart_id='cart_1')

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_idNoShopping cart identifier.

Output Schema

NameRequiredDescriptionDefault
storeYesMerchant domain identifier.
ucp_versionNoSupported UCP specification version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered without the description. The description adds modest value by indicating the response includes both line items and totals, but says nothing about empty-cart behavior or error handling for invalid cart_id.

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?

Two short sentences, purpose front-loaded, zero fluff. The example is marginally redundant given full schema coverage but is cheap and harmless.

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?

An output schema exists, so return-value documentation is not required, and annotations cover the safety profile. For a simple one-parameter read tool the description is nearly sufficient; only sibling disambiguation is missing.

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?

With 100% schema coverage on the single cart_id parameter, the schema already carries its semantics, so the baseline is 3. The inline example get_cart(cart_id='cart_1') adds only trivial call-shape value and no new meaning about format or sourcing of the identifier.

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 (Retrieve) and resource (current shopping cart items and totals) scoped by cart_id, which clearly separates it from write-side siblings like update_cart or cancel_cart. It does not, however, distinguish itself from get_checkout or get_order, which an agent could plausibly confuse with cart retrieval.

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

Usage Guidelines2/5

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

The description gives no explicit when-to-use or when-not-to-use guidance, and no prerequisites. With siblings get_checkout, get_order, and get_product_details present, a sentence routing the agent (e.g. 'use get_checkout for pending checkout state') would be needed to earn more.

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.