Skip to main content
Glama
Spaghetih
by Spaghetih

update_cart_line

Update the quantity of a cart line using its line ID; set quantity to 0 to delete the item.

Instructions

Fixe la quantité d'une ligne (line_id issu de view_cart). 0 supprime la ligne.

Input Schema

NameRequiredDescriptionDefault
line_idYes
quantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose one important behavior: quantity=0 removes the line. That is genuinely beyond the schema. It is silent on permission/auth requirements, what happens for negative quantities, out-of-stock or quantity-cap behavior, and error responses — significant gaps for a cart mutation tool.

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, no filler, and the delete-by-zero rule is placed immediately after the core action so it is not buried. Sized appropriately for a simple two-parameter mutation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter write tool with no annotations and no output schema, the description covers the essential calling semantics and the main side effect. It still leaves the agent without error behavior, edge-case handling for quantity, and the rationale for choosing this over remove_from_cart.

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 must compensate, and it does reasonably well: line_id is sourced to view_cart and quantity is defined by its effect, including the 0-to-delete special case. It omits any range, sign, or upper-bound constraints on quantity.

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 names a specific verb+resource ('Fixe la quantité d'une ligne') and adds the key semantic twist that a quantity of 0 deletes the line, which an agent could not infer from the name alone. It stops short of distinguishing itself from the sibling remove_from_cart, which overlaps with the quantity=0 behavior.

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 usefully tells the agent where line_id originates ('issu de view_cart'), implying the required call sequence before this one. However, there is no explicit guidance on when to use this versus remove_from_cart or add_to_cart, leaving the overlap for the agent to resolve.

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