Skip to main content
Glama

Validate cart

cart_validate
Read-only

Validate the current cart before checkout.

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": {
      "storeId": "<storeId>"
    },
    "name": "cart_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
storeIdYesOkam store id.

Output Schema

NameRequiredDescriptionDefault
storeIdNo
hasErrorsNo
cartIsEmptyNo
minimumPriceNo
storeIsClosedNo
itemsOutOfStockNo
paymentTypeErrorNo
priceDifferErrorNo
priceTooLowErrorNo
deliveryMethodErrorNo
deliveryAddressErrorNo
giftcardBalanceTooLowNo
sameDayAfterHoursOrderNotAllowedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / itemsOutOfStock / items / properties / allergens / items / properties / code
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered and the description only needs to add context. It adds the pre-checkout positioning but says nothing about what is validated (stock, pricing, availability) or what a failure result means, which matters for a validation tool that gates checkout.

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?

A single short sentence with zero filler, and the operative timing constraint is front and center. Nothing could be removed without losing information.

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 the description need not explain return values, which relieves most of the burden. Still, for a pre-checkout gate tool, the absence of any note on validation scope or failure semantics leaves the agent without enough to interpret results confidently.

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% with a single required storeId parameter, so the baseline of 3 applies. The description adds no meaning beyond the schema, not even confirming that the cart being validated belongs to that store.

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 ('Validate') and resource ('the current cart'), so the operation is clear at a glance. It does not, however, distinguish this from sibling reads such as cart_get or explain how it differs from checkout_verify, leaving the agent to infer the boundary.

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?

'before checkout' implies the timing context, which is useful implied guidance for when to call it. There is no explicit statement of when not to call it, no mention of prerequisites (e.g., a cart must already exist), and no routing to the alternatives cart_get or checkout_start.

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