Skip to main content
Glama

Klack Europe Shopping

Cambiar o eliminar línea del carrito

set_cart_quantity
Destructive

Cambia la cantidad de una línea existente; usar cantidad 0 para eliminarla.

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": {
      "cart_token": "<cart_token>",
      "product_id": "<product_id>",
      "quantity": "<quantity>"
    },
    "name": "set_cart_quantity"
  }
}

Input Schema

NameRequiredDescriptionDefault
quantityYes
cart_tokenYesToken opaco recibido de create_cart. No es un token de pago.
product_idYesID de producto simple o ID de variación seleccionada.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds the mechanism of destruction: setting quantity to 0 deletes the line. That is genuinely additive beyond the annotation flags and is the detail most likely to cause accidental data loss if unknown. It does not cover failure behavior for missing lines or invalid product IDs.

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 sentence with zero waste, front-loading the action and appending the critical edge case. Nothing could be removed without losing meaning.

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 simple three-parameter mutation tool with annotations covering the safety profile and no output schema, this is close to sufficient. The remaining gap is behavioral rather than structural: no mention of the returned cart state or errors on out-of-range or missing lines.

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 67%; cart_token and product_id already carry descriptions, while quantity is documented only by a 0–99 range. The description supplies the missing semantics for quantity (0 means delete), which is valuable, but adds nothing about the cart_token or product_id parameters beyond the schema.

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 uses a specific verb and resource ("cambia la cantidad de una línea existente") and adds the delete-via-zero semantics, which separates it in spirit from add_to_cart. It does not name the sibling it differs from, so an agent must infer that add_to_cart handles increments and this tool handles absolute quantity.

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?

It gives one clear usage rule — use quantity 0 to remove the line — which is the main ambiguity an agent would face. It offers no guidance on when to prefer this over add_to_cart, no statement about prerequisites (a cart that already contains the line), and no mention of what happens if the line does not exist.

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