Skip to main content
Glama

AIFEC

cart_update

Change the quantity of a cart line (the key comes from cart_view). Quantity 0 removes the line.

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": {
      "key": "<key>",
      "qty": "<qty>"
    },
    "name": "cart_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
qtyYes
session_idNoOnly if your client does not keep the MCP session (the Mcp-Session-Id header): the session_id that an earlier answer of this server gave you. It keeps the same cart between calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=false, so the description carries most of the burden; it usefully discloses that qty 0 deletes the line, a destructive side effect not visible in the schema. It does not describe what the call returns or whether the cart is re-priced, leaving some behavioral gaps.

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?

Two short sentences, front-loaded with the action and followed by the key provenance and the zero-quantity edge case. No wasted wording.

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 three-parameter mutation tool with no output schema, the description covers the action, the identifier source, and the destructive edge case. Only the return value / post-update cart state is left unstated, which is a small omission.

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 33% and the two required parameters have no schema descriptions, so the description must compensate: it explains that key is a cart-line identifier sourced from cart_view and that qty=0 has special removal semantics. session_id is already documented in the schema, so the remaining gap is minor.

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?

States a specific verb and resource (change the quantity of a cart line) and distinguishes itself from cart_add by operating on an existing line identified by a key. The parenthetical pointing to cart_view makes the resource identity unambiguous.

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?

Explains where the required key comes from (cart_view) and that qty 0 is the removal path, which tells the agent when this tool is the right choice. It stops short of explicitly contrasting with cart_add for adding new lines, but the usage context is clear.

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