Skip to main content
Glama

reeflip

Add or update by SKU

upsert_products
Idempotent

Adds or updates up to 100 products, each found by sku: a product with a variant of that SKU is updated (its product changes, and that variant's price and availability), and otherwise a product is made with one variant of that SKU (a title is then needed). Sending the same products twice makes no duplicates. Each is done on its own and answers created, updated or invalid, with the field to fix and a stable code: invalid_field, title_required, sku_ambiguous (two products have the SKU), category_not_found or photo_not_found. Photos join a product as they are added, sent with its product_id (add_photo_from_url, or an upload); product.media sets all its photos at once, in order, keeping as many as the plan allows on one product (the result's message then says how many were kept).

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": {
      "products": "<products>"
    },
    "name": "upsert_products"
  }
}

Input Schema

NameRequiredDescriptionDefault
productsYesUp to 100, each with a `sku`.

Output Schema

NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by defining per-item isolation and outcomes (`created`, `updated`, `invalid`), and enumerating the exact error codes with their meaning (`sku_ambiguous`, `title_required`, `category_not_found`, `photo_not_found`). It also discloses non-obvious side effects the annotations cannot express: `product.media` replaces all photos in order and silently truncates to what the plan allows, with the count reported in the response `message`.

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-loads the core semantics in the first sentence and packs the error vocabulary into one dense clause rather than a list, which keeps it compact. The trailing photo/media sentences are the weakest part — they read as an aside and mix product-photo behavior with a reference to sibling tools, slightly blurring the tool's own contract.

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?

Covers everything an agent needs for a batch upsert: matching key, create-vs-update branching, per-item failure isolation, error taxonomy, and media replacement limits. Because an output schema exists and the description already names the per-item result fields, return-value explanation is adequately handled without redundancy.

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 coverage is 100%, so the baseline is 3; the description earns above that by supplying meaning the schema omits, such as `title` being conditionally required only on the create path and `media` being a wholesale ordered replacement subject to a plan cap. The remaining gap is that the photo paragraph is written as workflow commentary rather than tying behavior to specific fields.

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?

Opens with a specific verb pair and resource ("Adds or updates up to 100 products") and immediately narrows scope to lookup by `sku`, which cleanly separates it from read-oriented siblings like find_products and show_products. The create-vs-update branch is spelled out in the same sentence, so the agent knows exactly what operation it is invoking.

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?

Gives a clear conditional rule for use: an existing variant SKU means update, no match means create with a `title` required. It also states the idempotency guarantee ("Sending the same products twice makes no duplicates"), which disambiguates it from a pure create tool. It does not name an explicit alternative tool for the read-only or delete cases, so it falls short of full when/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