Skip to main content
Glama
trhonpavel
by trhonpavel

Update product

update_product
Idempotent

Change specific product fields in Medusa, such as title, status, handle, images, collection, categories, tags, sales channels, or metadata. Send only fields to modify; list fields replace prior lists.

Instructions

Updates product fields – texts, status, handle, images, collection, categories, tags, sales channels, metadata. Send only the fields that should change. Lists (category_ids, tags, images, sales_channel_ids) replace the previous list.

Input Schema

NameRequiredDescriptionDefault
tagsNoTag values; missing tags are created
titleNo
handleNo
imagesNoImage URLs – replaces all images
statusNo
weightNo
metadataNoMerged into existing metadata; an empty string deletes a key
subtitleNo
thumbnailNo
product_idYes
descriptionNo
category_idsNo
discountableNo
collection_idNonull removes the product from its collection
sales_channel_idsNo
shipping_profile_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.3.0
    • addedInput schema / properties / category_ids
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / collection_id
      Added value: +{
      +  "description": "null removes the product from its collection",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / discountable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / images
      Added value: +{
      +  "description": "Image URLs – replaces all images",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / sales_channel_ids
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / shipping_profile_id
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / tags
      Added value: +{
      +  "description": "Tag values; missing tags are created",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / thumbnail
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / weight
      Added value: +{
      +  "minimum": 0,
      +  "type": "number"
      +}
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false. The description goes beyond them by disclosing two non-obvious behaviors: partial-update semantics (only changed fields are sent) and that list fields (category_ids, tags, images, sales_channel_ids) fully replace prior values rather than appending. That replace behavior is the kind of data-loss nuance annotations do not capture, though it omits permission/return context.

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?

Three tightly written sentences, front-loaded with the core action, followed by the patch instruction and then the list-replace caveat. Every sentence earns its place with no redundancy.

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

Completeness3/5

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

For a 16-parameter mutation with no output schema, the description covers the most important behavioral surprises (patch semantics, list replacement) but omits return behavior, permission requirements, and semantics for roughly half the parameters. It is adequate but not complete for the tool's complexity.

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 only 25%, so the description must compensate and it only partially does so. It clarifies the replace semantics for the four list params and names the field families, but leaves many of the 16 params (weight, subtitle, thumbnail, discountable, shipping_profile_id, description) without added meaning, and does not explain the null-removes-collection behavior.

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

Purpose4/5

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

The description opens with a specific verb+resource ('Updates product fields') and enumerates the exact field families affected (texts, status, handle, images, collection, categories, tags, sales channels, metadata). An agent can tell it apart from create_product, get_product, and update_variant from the text alone, though it never explicitly names those siblings.

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

Usage Guidelines3/5

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

'Send only the fields that should change' is a useful patch-semantics guideline for how to call it, but there is no statement of when to prefer this over create_product, update_variant, or the various set_* siblings, and no prerequisites or exclusions. Usage is implied rather than spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.