Skip to main content
Glama

create_cart

Create an empty cart and get its cart_id handle. Requires an API key with the cart:write scope. The cart belongs to that key: only the same key can read or change it.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

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 observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose non-obvious behavior: the required write scope and the key-bound ownership rule ('only the same key can read or change it'), which is exactly the kind of access-control detail an agent cannot infer. It stops short of covering idempotency, whether multiple carts can coexist, or cart lifetime/expiry.

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?

Three short sentences, front-loaded with the action and result, then the auth requirement, then the ownership caveat. No filler or restated name/title.

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 parameterless creation tool with an output schema, this covers the essentials: what it does, the auth scope, and the ownership model. The remaining gap is lifecycle semantics — whether carts expire or whether repeated calls create multiple carts — which matters for correct agent behavior.

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 takes zero parameters, so the baseline is 4; there is no per-parameter semantics to explain. The only mention of a data field (cart_id) concerns the return value, which is already described by the output schema.

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 opens with a specific verb and resource — 'Create an empty cart' — and adds the outcome, 'get its cart_id handle', which tells an agent exactly what comes back. It is clearly distinct from sibling mutators like add_cart_item or get_cart, though it never names them explicitly.

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?

It states a real prerequisite (an API key with the cart:write scope) and a constraint on who can subsequently use the cart, which implies this is the setup call before item operations. However, it never says when to call this versus, say, get_cart for an existing cart, nor whether a new cart should be created per session or reused.

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