Skip to main content
Glama

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

create_cart

Idempotent

Create a new shopping cart with initial line items. Example: create_cart(line_items=['agd-pass-2000'])

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
line_itemsNoLine items to place in the cart.

Output Schema

NameRequiredDescriptionDefault
storeYesMerchant domain identifier.
ucp_versionNoSupported UCP specification version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds nothing behavioral on top: it does not say what happens if the cart already exists, whether carts expire, whether auth/session is required, or what the idempotency hint actually means in practice.

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, front-loaded with the purpose and followed by a concrete example; nothing is padded. The example is somewhat redundant with the schema but earns its place by disambiguating line item format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 values need not be explained, and with one optional parameter the schema burden is low. However, for a tool sitting in a full cart/checkout lifecycle, the description omits the flow context (does this replace create_checkout, must the cart exist before checkout, what an empty call does) that an agent needs to sequence calls correctly.

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 there is only one parameter, so the baseline is 3, but the example adds real meaning: it shows a line item is a product identifier string ('agd-pass-2000') rather than a structured object, resolving an ambiguity the schema's one-line description leaves open. It does not cover quantity or multiple-item form, which keeps it from a 5.

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 — 'Create a new shopping cart with initial line items' — which an agent can distinguish from get_cart, update_cart, and cancel_cart in the sibling list. It stops short of explicitly naming when this differs from create_checkout, but the purpose itself is unambiguous.

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?

No when-to-use or when-not-to-use guidance: nothing says whether a cart must exist before create_checkout, whether creating a second cart is valid, or how this relates to update_cart. The only usage signal is a bare invocation example, which shows syntax rather than selection criteria.

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.