Skip to main content
Glama

get_cart

Retrieve a specific cart by its ID to view line items and exact integer-yen totals, matching the store's cart page calculations.

Instructions

Get one of your carts by cart_id: its lines and totals in integer yen, computed exactly as the store's cart page computes them.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cart_id": "<cart_id>"
    },
    "name": "get_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
cart_idYesThe cart handle, from `create_cart`.

Output Schema

NameRequiredDescriptionDefault
linesYesThe cart's lines, in cart order.
cart_idYesThe cart handle.
total_yenYesGrand total in yen: subtotal plus shipping.
item_countYesTotal units across all lines.
shipping_yenYesShipping fee in yen (free at the store's threshold).
subtotal_yenYesSum of purchasable line totals, in yen.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does add real behavioral context: totals are in integer yen (unit and type) and are 'computed exactly as the store's cart page computes them' (a consistency guarantee against a visible source of truth). It omits error behavior for an invalid or expired cart_id and any permission scope, which keeps it below a 5.

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?

One sentence, front-loaded with the access pattern, then the return content, then the precision guarantee. No filler and nothing that could be cut without losing meaning.

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 one-parameter read tool with an output schema present, the description covers the identity of the resource, the result content, and the numeric convention. Nothing an agent needs in order 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the tool has a single required parameter, so the schema already documents cart_id including its provenance from create_cart. The description adds only a restatement ('by cart_id') with no extra format or validation nuance, which is the baseline case.

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?

The description names a specific verb and resource ('Get one of your carts by cart_id') and further specifies the payload ('its lines and totals'). It is clearly a single-cart read operation, distinct from mutation siblings like add_cart_item or update_cart_item, though it does not explicitly name or contrast those siblings.

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?

Usage is implied rather than stated: 'by cart_id' plus the schema note that the handle comes from create_cart sketches the workflow, but there is no explicit when-to-use guidance, no mention of alternatives for cart state, and no exclusions.

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