Skip to main content
Glama

agtmart sandbox store and agent survey

Add item to sandbox cart

add_to_cart

Add a product to a cart. Omit cart_id to create a new cart; reuse the returned cart_id on later calls. Carts expire 24 hours after the last change. Products with variants need variant_id.

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": {
      "product_id": "<product_id>"
    },
    "name": "add_to_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
cart_idNo
quantityNo
product_idYes
variant_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive behavior, so the bar is lower. The description usefully adds the 24-hour expiry-after-last-change rule and the cart lifecycle (create vs. reuse), but says nothing about quantity limits, error conditions, or what happens when a cart has expired.

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?

Four short sentences, front-loaded with the core action and then the lifecycle rules in the order an agent needs them. Every sentence carries information; only the expiry note is arguably optional context.

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 4-parameter cart mutation with no output schema, the description covers the essential call pattern: required product_id, optional cart creation, variant requirement, and cart lifetime. Missing quantity guidance and any note on failure modes keeps it from being fully complete.

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 coverage is 0%, so the description must carry the load: it explains cart_id's create-vs-reuse semantics and variant_id's requirement for variant products, which is real added meaning. However, quantity and its 1-10 bounds go unmentioned, leaving one of four parameters entirely undocumented in prose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 ('Add a product to a cart') that distinguishes it from siblings like get_cart and checkout. It also names the product-level unit of work, so an agent can tell this is the cart-mutation tool.

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

Usage Guidelines4/5

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

It gives concrete conditional guidance: omit cart_id to create a new cart, reuse the returned cart_id later, and supply variant_id for variant products. It does not point to explicit alternatives (e.g. get_cart for inspecting, checkout for finalizing), so it stops short of full when/when-not routing.

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