Skip to main content
Glama

Update cart

update_cart
Idempotent

Replace the cart line items / context.

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

Input Schema

NameRequiredDescriptionDefault
idYesResource id.
cartYesUCP cart payload, shape per https://ucp.dev/2026-08-25/schemas/shopping/cart.json
metaNoUCP request metadata: {"ucp-agent": {"profile": "<platform profile URL>"}, "idempotency-key": "<uuid>"}.

Output Schema

NameRequiredDescriptionDefault
ucpYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so safety and repeat-call behavior are covered structurally. The description's only added signal is the word "Replace," which usefully implies full overwrite rather than a merge/patch. It says nothing about what happens to existing line items or how the idempotency-key in meta should be used.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single seven-word fragment with zero padding and the operative verb front-loaded, so nothing is wasted. But the terseness is under-specification rather than efficiency, and the slash construction reads as an unfinished thought rather than a structured statement.

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

Completeness2/5

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

This is a mutating tool taking a nested, externally-specified UCP cart payload, yet the description is a fragment. The output schema does relieve it of explaining return values, but replacement semantics, the role of the idempotency-key, and any constraints on the payload are left entirely unaddressed. For a tool of this complexity, it falls well short.

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 description coverage is 100%, with the cart parameter pointing at the UCP cart.json schema and meta documenting ucp-agent and idempotency-key, so the schema carries the burden. The description adds no meaning beyond that, merely echoing "line items / context." Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Replace the cart line items" names a verb and resource, so an agent can tell this is a full-overwrite of a cart rather than a read or create. However, the appended "/ context" is vague, and nothing distinguishes it from siblings like update_checkout or get_cart. Purpose is recognizable but not sharp.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no named alternative. An agent must infer on its own that this replaces an existing cart wholesale versus using create_cart or update_checkout, and nothing tells it when a replacement is inappropriate.

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