Skip to main content
Glama

taufnaus Geschenke-Shop

Warenkorb setzen

set_cart

Create or replace the cart. Pass cart_id to change an existing cart (omit it to create one). items replace the whole cart; quantity 0 removes an item. All items must come from the same shop. For products with pack sizes pass variant_id from get_product. Quantities above stock are rejected with a message.

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": {
      "items": "<items>"
    },
    "name": "set_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
cart_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly=false and destructive=false, but the description adds the important behavioral detail that items replace the entire cart rather than append, plus the cross-shop constraint and the stock-validation rejection path. This is meaningful context beyond the structured fields; what is missing is any statement about return value or what happens on partial failure.

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?

Five short sentences, front-loaded with the create-or-replace distinction, then item semantics, then the shop constraint, then variant and stock rules. Every sentence conveys a rule an agent would otherwise get wrong.

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 two-parameter mutation tool with no output schema, the description covers the operation modes, the nested item semantics, the business constraints, and the failure mode. Only the success response shape is unstated, which is a minor omission given there is no output schema to lean on.

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 description coverage is 0%, so the description carries the full burden and mostly does: cart_id's create-vs-replace semantics, the whole-cart replacement behavior of items, the quantity-0 removal convention, and when variant_id is required for pack sizes. product_id itself and ID formatting are left implicit, which is the only real gap.

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?

"Create or replace the cart" is a specific verb+resource statement, and the cart_id branch (pass it to change, omit it to create) makes the two modes of operation explicit. It does not explicitly contrast with the read-side sibling get_cart, so an agent must infer that separation from the name alone.

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?

Gives concrete when-to guidance for the two parameters: pass cart_id to modify an existing cart, omit it to create a new one, and use quantity 0 to remove an item rather than needing a separate removal call. It also routes the agent to get_product when a pack-size variant is needed. No exclusions about when not to use it (e.g. versus checkout) are stated.

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