Skip to main content
Glama

Update product

update_product
Destructive

Update fields on an existing catalog product by id — including status, to publish a draft or archive a product. Provide a patch with at least one field; use get_product first to see the current values. A changed stock number is applied as a relative movement and recorded in the product stock history; prefer adjust_stock when the intent is a correction with a reason. A bundle's stock is derived from its components, so a stock sent for a bundle is refused; sending bundleItems replaces its composition. A product's type (simple or bundle) cannot change after creation — create a new product instead — and a product that is a component of a bundle that is not archived cannot be archived. A change to price, stock, tracking or status is pushed to every connected sales channel. For a product that belongs to a model, a changed shared field (name, description, category, brand, unit, keywords, videos, material, pattern, gender, age group, size type, condition) is applied to the whole model and every article of it; productGroupId null detaches the product from its model, and the code of another model moves it there. The result echoes the operating workspace.

Input Schema

NameRequiredDescriptionDefault
idYesThe product id returned by search_products.
patchYesThe product fields to update; include at least one changed field.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / patch / properties / images / description
      Added value: +"The product's photos as { url, alt }, at most 10; the first is the main photo. On an update the list you send replaces the whole set. An entry whose url equals a photo the product already has keeps that stored file and takes only the caption (alt) you send, so sending back what you read never downgrades a stored photo."
  2. Changed13 schema fields changed
    • removedInput schema / properties / patch / properties / bundleItems / default
      Removed value: -[]
    • addedInput schema / properties / patch / properties / bundleItems / description
      Added value: +"Components of a bundle (type bundle only): simple, non-archived products of the bundle's warehouse, each listed once. Selling the bundle deducts these components; the bundle's stock is how many whole bundles they make. On update, sending it replaces the whole composition."
    • addedInput schema / properties / patch / properties / costPrice / description
      Added value: +"Purchase price per unit, in costCurrency. Ignored for a bundle: its cost is the sum of its components' costs when all are known and in one currency."
    • addedInput schema / properties / patch / properties / images / items / properties / alt
      Added value: +{
      +  "description": "Alternative text of the photo, up to 200 characters. Optional: when empty a storefront should use the product name.",
      +  "example": "White leather sneakers, side view",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • addedInput schema / properties / patch / properties / mpn
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 120,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Manufacturer part number — the maker's own code for the item, not the shop SKU. eBay requires it beside the brand in many categories.",
      +  "example": "TR-1"
      +}
    • removedInput schema / properties / patch / properties / status / default
      Removed value: -"draft"
    • addedInput schema / properties / patch / properties / stock / description
      Added value: +"Units on hand, for a product that tracks inventory; a change on update is recorded as a relative movement in the stock history. Refused for a bundle — its stock is derived from its components."
    • removedInput schema / properties / patch / properties / tags / default
      Removed value: -[]
    • removedInput schema / properties / patch / properties / trackInventory / default
      Removed value: -false
    • addedInput schema / properties / patch / properties / trackInventory / description
      Added value: +"Whether the product counts units. Ignored for a bundle: it tracks stock exactly when one of its components does."
    • removedInput schema / properties / patch / properties / type / default
      Removed value: -"simple"
    • addedInput schema / properties / patch / properties / type / description
      Added value: +"simple, or bundle — one sellable item made of bundleItems, holding no stock of its own. Fixed at creation: an update that changes it is refused."
    • removedInput schema / properties / patch / properties / videos / default
      Removed value: -[]
  3. Changed1 schema field changed
    • addedInput schema / properties / patch / properties / costCurrency
      Added value: +{
      +  "anyOf": [
      +    {
      +      "pattern": "^[A-Z]{3}$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / patch / properties / videos
      Added value: +{
      +  "default": [],
      +  "description": "Video links for the product page (YouTube, Vimeo or a direct file), https only, at most 5. Links, not uploads. On update, sending the field replaces the whole list.",
      +  "example": [
      +    {
      +      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
      +    }
      +  ],
      +  "items": {
      +    "properties": {
      +      "url": {
      +        "format": "uri",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 5,
      +  "type": "array"
      +}
  5. Changed10 schema fields changed
    • addedInput schema / properties / patch / properties / ageGroup
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "newborn",
      +        "infant",
      +        "toddler",
      +        "kids",
      +        "adult"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / color
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 80,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / condition
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "new",
      +        "used",
      +        "refurbished"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / gender
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "male",
      +        "female",
      +        "unisex"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / material
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 120,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / pattern
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 80,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / productGroupId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 120,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / size
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 60,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / sizeSystem
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "AU",
      +        "BR",
      +        "CN",
      +        "DE",
      +        "EU",
      +        "FR",
      +        "IT",
      +        "JP",
      +        "MEX",
      +        "UK",
      +        "US"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / patch / properties / sizeType
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 40,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  6. Changed1 schema field changed
    • changedInput schema / properties / patch / properties / images / items / properties / uploadedAt / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"New value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
  7. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare a destructive, non-idempotent write, and the description adds substantial beyond-annotation detail: stock changes are recorded as relative movements in stock history, bundle stock is refused, bundleItems replaces composition, price/stock/tracking/status changes propagate to sales channels, and model shared fields cascade. These are consequences an agent cannot infer from the schema.

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 purpose before the behavioral caveats, and nearly every sentence carries a distinct rule. It is nonetheless a single dense block; the many independent constraints would scan better as a list, which keeps it short of 5.

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 30+ field destructive mutation with a nested patch object and no output schema, the description covers the mutation consequences, refusals, and cascade rules, and notes the result 'echoes the operating workspace'. Nothing an agent needs to invoke it safely is missing.

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, but the description adds cross-field semantics the schema states only per-field: productGroupId null detaches from the model, another model's code moves the product, and bundleItems/stock interact with type. It does not restate trivial per-field types, keeping this above baseline.

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 ('Update fields on an existing catalog product by id') and immediately scopes the outcome ('including status, to publish a draft or archive a product'). It distinguishes itself from siblings by naming adjust_stock, create_product, and get_product as related routes.

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?

Explicit routing is present: call get_product first to see current values, prefer adjust_stock when the intent is a correction with a reason, and create a new product when the type must change. This gives when-to-use, prerequisites, and named alternatives.

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