Skip to main content
Glama

update_basket_quantity

Set an item's exact quantity in the basket and remove it by setting quantity to 0; returns the updated basket.

Instructions

Set an item's exact quantity in the basket. quantity=0 removes the item. Returns the updated basket. Requires authentication.

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": {
      "productId": "<productId>",
      "quantity": "<quantity>"
    },
    "name": "update_basket_quantity"
  }
}

Input Schema

NameRequiredDescriptionDefault
quantityYesExact target quantity. 0 removes the item.
productIdYesProduct UID.
shoppingListIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does supply useful context: authentication is required, quantity=0 acts as a removal (a semi-destructive behavior), and the tool returns the updated basket. It omits error behavior for unknown products, whether the call is idempotent, and what shoppingListId changes about the target basket.

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 action and each contributing distinct information (exact-value semantics, removal edge case, return value, auth). No filler, though the auth note could be folded elsewhere.

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 with no annotations and no output schema, the definition covers purpose, the key edge case, the return value, and the auth requirement. The remaining gap is the undescribed shoppingListId parameter and unstated error behavior when the product is not in the basket.

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% and the schema already documents quantity ('Exact target quantity. 0 removes the item.') and productId. The description only restates the quantity=0 rule and adds nothing for shoppingListId, which is undocumented in both schema and description.

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?

States a specific verb and resource ('Set an item's exact quantity in the basket'), which clearly distinguishes a set-to-exact-value operation from the add/remove siblings. It also flags that quantity=0 removes the item, though it does not name remove_from_basket as the alternative for that case.

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?

Usage is only implied: 'exact quantity' suggests this is the right tool for adjusting an existing line rather than adding a new one. There is no explicit statement of when to prefer this over add_to_basket or remove_from_basket, and no note on whether the item must already be in the basket.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.