Skip to main content
Glama

cart.updateLineQuantity

Idempotent

Change the quantity of an existing line in a droplinked cart. Identifies the line by skuId (the variant id used when the line was added). Returns { status, cartId, skuId, updatedQuantity }. Use cart.removeLine to remove a line entirely instead of setting quantity=0. Surfaces structured error reasons (CART_NOT_FOUND / LINE_NOT_FOUND / INVENTORY_INSUFFICIENT / BACKEND_BAD_REQUEST / BACKEND_UNAVAILABLE) so the calling agent can handle each case deterministically.

AUTH: not on the public read tier — calling this without a valid X-MCP-API-Key returns JSON-RPC error -32001 with data.code=MCP_API_KEY_REQUIRED and never reaches the tool. Request a key from ops@droplinked.com. Discovery, catalogue and trust-fabric reads need no credential.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuIdYes
cartIdYes
quantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/destructive hints, so the description adds meaningful context: the exact return shape, structured error reasons, and the precise auth failure mode with error code -32001. This goes well beyond the structured metadata.

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?

The description is front-loaded with the core action, then return value, then alternative, then error handling, then auth. Every sentence adds operational value with no filler or repetition of the schema.

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

Completeness5/5

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

For a mutation tool with no output schema, the description is complete: it gives the return shape, structured error reasons, authentication requirements, and the key usage rule about removal. An agent has enough to invoke it correctly and handle failures deterministically.

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 carries the burden. It explains that skuId is the variant id used when the line was added and clarifies that quantity=0 is not the removal mechanism. cartId is left self-evident, but the critical disambiguation is provided.

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?

The description states a specific verb and resource ('Change the quantity of an existing line in a droplinked cart'), clarifies the identifying parameter (skuId), and explicitly contrasts with cart.removeLine. This distinguishes it clearly from sibling cart tools like cart.addLine and cart.removeLine.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly tells the agent when to use an alternative: 'Use cart.removeLine to remove a line entirely instead of setting quantity=0.' It also specifies the authentication precondition and which calls require credentials, giving clear operational context.

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