Skip to main content
Glama

HamroLink Business OS MCP Server

commerce.update_product

Destructive

Updates an existing product or specific variants in store inventory (supports additive stockDelta and atomic bulk variantUpdates) with post-write persistence verification.

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": {
      "siteId": "<siteId>",
      "productId": "<productId>"
    },
    "name": "commerce.update_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoUpdated name
sizeNoOptional variant size
colorNoOptional variant color
priceNoUpdated price
stockNoUpdated stock count
imagesNoUpdated images array
siteIdYesMongoDB Site ID
categoryNoUpdated category
variantsNoList of variant objects with name, price, offerPrice, and stock
productIdYesMongoDB Product ID
offerPriceNoUpdated offer price
stockDeltaNoAdditive stock adjustment (e.g. +10)
descriptionNoUpdated description
variantTypeNoType of variants (e.g. 'ram_storage', 'ram', 'storage', 'mobile', 'size', 'color', 'weight', 'flavor', 'custom')
targetVariantNoOptional specific variant selector
variantUpdatesNoAtomic bulk multi-variant updates ({ targetVariant/color/size, stock?, stockDelta?, price? })

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructive=true, openWorld=true and readOnly=false, so the risk profile is supplied. The description adds genuinely useful context beyond that: additive stockDelta semantics, atomic bulk variantUpdates, and post-write persistence verification. It still omits what happens to unspecified fields (overwrite vs preserve) and any conflict behavior when product-level and variant-level inputs are combined.

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?

A single dense sentence with the core action front-loaded and the differentiating modifiers in parentheses. It earns most of its words, though the parenthetical is packed tightly enough to be hard to parse on first read.

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 destructive mutation with no output schema, the description covers the main behavioral flags but does not resolve how the overlapping pathways (stock vs stockDelta, variants vs variantUpdates, name/color/size vs targetVariant) interact. An agent is still left to infer precedence and merge semantics.

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%, so all 16 parameters already carry their own descriptions. The description largely restates what the schema says about stockDelta and variantUpdates rather than adding new meaning, so baseline 3 applies.

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?

'Updates an existing product or specific variants in store inventory' states a specific verb plus resource and scope, and the verb cleanly separates it from the create/delete/get siblings. It stops short of naming any sibling to route against.

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?

The phrase 'updates an existing product' implies the precondition that the product must already exist, and 'specific variants' hints at targeting. But there is no explicit when-to-use vs create_product or delete_product guidance, and no instruction on when to prefer stockDelta over stock or variantUpdates over variants.

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.