Skip to main content
Glama

Change quantity in cart

foran_cart_update
Idempotent

Updates the quantity for a specified cart line using its cart ID, and sets quantity to 0 to remove the item.

Instructions

Set a new quantity for one cart line (cart_id from foran_cart_view). Quantity 0 removes it.

Input Schema

NameRequiredDescriptionDefault
moduleNomart = groceries and daily needs; bites = restaurant food.mart
cart_idYes
quantityYes
session_keyYesThe session_key returned by foran_login.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare idempotency, non-read-only status, and non-destructiveness; the description adds the important behavioral fact that quantity 0 deletes the line, which annotations alone would not reveal. It does not state whether the call returns the updated cart or totals, but that is a minor gap given the annotation coverage.

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, zero filler, and the core action is front-loaded ahead of the cart_id source and removal caveat. Every clause carries information the agent needs.

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 four-parameter mutation with no output schema, the description covers the action, the key input's origin, and the special-case behavior. It leaves out what the response contains and whether a session must be established first, but those are handled by the schema's session_key documentation.

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 only 50%, with cart_id and quantity undocumented in the schema, so the description must compensate. It does: cart_id's provenance is named and quantity's zero-value semantics are spelled out, covering both gaps (the 0-50 bound remains schema-only but is self-evident).

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 gives a specific verb and resource ('Set a new quantity for one cart line'), which immediately separates it from generic cart tools. It does not explicitly name foran_cart_remove as the alternative, but the 'quantity 0 removes it' clause effectively disambiguates the overlap.

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 states where cart_id must come from (foran_cart_view) and clarifies the removal case, so an agent knows the main precondition and the edge case. It stops short of saying when to prefer this over foran_cart_remove, which is the one remaining routing ambiguity among siblings.

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