Skip to main content
Glama

Nowacell

UCP Cart Update

update_cart

Set or change the quantity of a line item, or add, remove, or replace the line items, in an existing cart through the shared UCP cart capability. Use this, NOT get_cart, for any change to the cart contents or line-item quantities. The payload parameter is a JSON object matching the UCP cart.update request: it carries the complete "line_items" array; the cart id travels as the id parameter and is not repeated in the payload. line_items replaces the cart contents rather than patching them, so always resend every line you want to keep. Always use dryRun=true (the default) to validate the request without persisting it, then set dryRun=false to commit.

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": {
      "id": "<id>"
    },
    "name": "update_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
dryRunNo
payloadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and delivers the critical trait: line_items 'replaces the cart contents rather than patching them, so always resend every line you want to keep' — a destructive-semantics disclosure an agent would otherwise miss. It also discloses dryRun defaults and its non-persisting validate behavior. Left out are auth/permission requirements, rate limits, and what a dry-run response or failure looks like, so it is strong but not complete.

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?

Front-loaded with the action and the sibling exclusion, then the payload shape, then the replace-vs-patch warning, then the dry-run workflow — a sensible order with essentially no filler. The opening sentence is slightly overstuffed by packing add/remove/replace/quantity into one clause, but nothing is redundant.

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 an unannotated mutation tool with a nested payload and zero schema description coverage, this covers the highest-risk facts: full replacement semantics, id placement, and the dry-run-then-commit flow. What remains thin is the payload's internal field set and any statement about return values or failure modes, which matters given there is no output schema.

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%, yet the description explains all three parameters: id is the cart id and is deliberately not repeated inside the payload, dryRun defaults true and validates without persisting, and payload is a JSON object matching the UCP cart.update request carrying the complete line_items array. The residual gap is that the nested payload's individual fields are only referenced by external spec ('matching the UCP cart.update request') rather than enumerated.

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?

States a specific verb and resource ('Set or change the quantity of a line item, or add, remove, or replace the line items, in an existing cart') and explicitly names the sibling it is not ('Use this, NOT get_cart'). An agent can distinguish it from get_cart and the checkout tools without opening any schema.

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?

Gives an explicit exclusion ('Use this, NOT get_cart, for any change to the cart contents or line-item quantities') plus a concrete operating procedure: validate with dryRun=true first, then commit with dryRun=false. That is both when-to-use and how-to-use guidance rather than implied 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