Skip to main content
Glama

Update product (offer) lifecycle state

update_product_state
Destructive

Switch a product between PUBLIC and HIDDEN to control storefront visibility; preserves its sold-out flag and does nothing if the state already matches.

Instructions

Rate limit: 100 requests / 10 seconds per shop. See Rate limiting.

Transitions the product between PUBLIC and HIDDEN. Use DELETE /products/{productId} to archive — ARCHIVED is not reachable here. The sold-out (available) flag is preserved; flip it via PUT /products/{productId}/availability. Idempotent: no-op if the product is already in the requested state.

Input Schema

NameRequiredDescriptionDefault
stateNo
accountNoExact private shop profile label; not a provider identity or authorization proof.
confirmNoSet true only when the user asked for exactly this action.
payloadNoComplete current native JSON body; cannot mix with native body flags or payload_file.
product_idYesNative productId
payload_fileNoAbsolute regular non-symlink native JSON body file, at most1MiB. Cannot mix with payload or body flags.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv3.0.0
    • addedInput schema / $defs
      Added value: +{
      +  "state": {
      +    "description": "Target lifecycle state. `PUBLIC` makes the product visible on the storefront; `HIDDEN` keeps it unlisted. The sold-out (`available`) flag is preserved across the transition — use `PUT /products/{productId}/availability` to flip it.",
      +    "enum": [
      +      "PUBLIC",
      +      "HIDDEN"
      +    ],
      +    "type": "string"
      +  }
      +}
    • changedInput schema / properties / confirm / description
      Previous value: -"Explicit approval for this exact provider effect or local private-file operation."New value: +"Set true only when the user asked for exactly this action."
    • addedInput schema / properties / payload / properties / state / $ref
      Added value: +"#/$defs/state"
    • removedInput schema / properties / payload / properties / state / description
      Removed value: -"Target lifecycle state. `PUBLIC` makes the product visible on the storefront; `HIDDEN` keeps it unlisted. The sold-out (`available`) flag is preserved across the transition — use `PUT /products/{productId}/availability` to flip it."
    • removedInput schema / properties / payload / properties / state / enum
      Removed value: -[
      -  "PUBLIC",
      -  "HIDDEN"
      -]
    • removedInput schema / properties / payload / properties / state / type
      Removed value: -"string"
    • addedInput schema / properties / state / $ref
      Added value: +"#/$defs/state"
    • removedInput schema / properties / state / description
      Removed value: -"Target lifecycle state. `PUBLIC` makes the product visible on the storefront; `HIDDEN` keeps it unlisted. The sold-out (`available`) flag is preserved across the transition — use `PUT /products/{productId}/availability` to flip it."
    • removedInput schema / properties / state / enum
      Removed value: -[
      -  "PUBLIC",
      -  "HIDDEN"
      -]
    • removedInput schema / properties / state / type
      Removed value: -"string"
  2. First observedv2.0.0

TDQS

A3.5/5.0
Behavior1/5

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

The description explicitly claims 'Idempotent: no-op if the product is already in the requested state,' while the annotations declare idempotentHint=false — a direct, material conflict an agent could rely on to skip a repeat call or re-check state. It also frames the operation as a benign, reversible visibility flip while destructiveHint=true, though that tension is less clear-cut than the idempotency one.

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 tight sentences, no filler, with the scope and exclusions laid out compactly. Leading with the rate limit rather than the operation itself is a mild front-loading miss, but everything stated earns its place.

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?

Covers rate limits, the two alternate endpoints for adjacent concerns, state reachability, and flag preservation — a lot of what an agent needs for a 6-parameter mutation with no output schema. It is undermined somewhat by the false idempotency claim, and it leaves account/confirm/payload to the schema.

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 83%, so the schema already documents state, account, confirm, and the payload variants, including the same PUBLIC/HIDDEN explanation. The description repeats the state semantics and availability-preservation note rather than adding new parameter-level meaning, so the baseline 3 applies.

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 — transitioning the product between PUBLIC and HIDDEN — and explicitly sets the boundary against two adjacent operations (archiving, availability toggling). An agent can tell this apart from archive_product and toggle_product_availability without opening any schema.

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 real when-to-use guidance by naming the alternatives: archive via DELETE /products/{productId} and sold-out flag via PUT /products/{productId}/availability, plus the non-reachable ARCHIVED state. Slightly short of 5 because it routes by raw HTTP path rather than by the sibling tool names (archive_product, toggle_product_availability) the agent actually sees.

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

Deploy Server

Other Tools