Skip to main content
Glama

Set product inventory

set_product_inventory
DestructiveIdempotent

Set stock counts and stock policy for a Replo-managed product's variants, addressing each variant by its option-value combination (empty optionValues for a product with no options). available is an absolute count, not a delta. Turning on trackInventory without an available count leaves the variant unsellable until a count exists — set both together. Only products the merchant fulfills themselves can track stock; print-on-demand and digital variants are made to order and will be refused. Before creating, changing or showing Replo products on a page, call skills with name "replo-products".

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": {
      "productId": "<productId>",
      "variants": "<variants>"
    },
    "name": "set_product_inventory"
  }
}

Input Schema

NameRequiredDescriptionDefault
variantsYes
productIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / productId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true; the description corroborates them by explaining that available is an absolute count (overwrite, not delta), that enabling trackInventory without a count leaves the variant unsellable, and that certain variant types are refused outright. These are the failure modes and state transitions 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?

Four dense sentences, with the core semantics (absolute vs delta, coupled fields) front-loaded and no filler. The closing skills prerequisite is valuable but reads as appended cross-tool boilerplate rather than integrated guidance.

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

Completeness4/5

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

For a two-parameter mutation with no output schema, the description covers prerequisites, refusal conditions and field semantics well. It does not say whether a call replaces inventory across all listed variants atomically or what a partial failure looks like when up to 250 variants are submitted, which is the remaining practical unknown.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the semantics, and it does: available is an absolute count rather than a delta, optionValues must be empty for a product with no options, and trackInventory and available are coupled. Those are exactly the three fields where a caller would otherwise guess wrong.

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?

States a specific verb+resource: setting stock counts and stock policy for variants of a Replo-managed product, and further specifies that variants are addressed by option-value combination. That is unambiguous about scope and granularity. It stops short of naming a contrasting sibling (e.g. update_product) to say why stock is set here rather than there.

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 explicit preconditions and exclusions: trackInventory must be set together with available, and print-on-demand/digital variants are refused because they are made to order. It also routes the agent to the skills tool with name "replo-products" before creating, changing or showing products. The only gap is that no alternative tool is named for cases where the product itself needs editing.

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