Skip to main content
Glama

cart.addLine

Add a product variant (skuId) and quantity to an existing droplinked cart. Use this to build a multi-item cart incrementally before checking out. Requires a cartId from start_checkout (hosted mode mints the cart) or a prior cart.addLine call. Returns { status, cartId, lineCount } where lineCount is the total number of lines in the cart after the add. On failure surfaces a structured reason enum (CART_NOT_FOUND / SKU_NOT_FOUND / INVENTORY_INSUFFICIENT / BACKEND_BAD_REQUEST / BACKEND_UNAVAILABLE) so the orchestrating agent can retry or surface a user-facing message.

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
referrerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the exact return shape ({ status, cartId, lineCount }), the failure enum with values, the runtime auth failure mode (JSON-RPC -32001, never reaches the tool), and the credentialing contact. This gives an agent concrete expectations of side effects and error handling.

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 text is longer than typical, but every component earns its place: purpose, usage, dependency, return, failures, and auth. Key information is front-loaded and the AUTH section is cleanly separated.

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 unusually complete: it covers how to get the cart ID, what the response contains, the main failure reasons, and the auth prerequisite. Only the optional referrer parameter is left unexplained, which is minor against the rest.

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?

With 0% schema description coverage, the description carries most parameter meaning. It explains cartId through its source, skuId as the product variant, and quantity as the line amount. However, the optional referrer parameter is never mentioned, leaving its semantics undocumented.

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 opens with a specific verb and resource: 'Add a product variant (skuId) and quantity to an existing droplinked cart.' It clearly names the targeted entity and distinguishes this from sibling tools like cart.removeLine and cart.updateLineQuantity by framing it as incremental cart building.

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?

'Use this to build a multi-item cart incrementally before checking out' states the intended use context, and the cartId provenance from start_checkout or a prior cart.addLine call gives the ordering prerequisite. It does not explicitly exclude alternatives (e.g., pointing to cart.updateLineQuantity for quantity changes), so it stops short of full when-not guidance.

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