Skip to main content
Glama

Change a product

wp_wc_update_product
Destructive

WooCommerce: change a product's regular price, sale price, stock quantity or status. Only the fields given change; all of them are checked before anything is written, so a refused call (bad price, unknown status, unknown id) leaves the product as it was. Returns updated and the product as saved (the fields of wp_wc_get_product). Needs manage_woocommerce and the right to edit this product (edit_product), which a site can withhold for single products; no undo point is recorded. Requires WooCommerce. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
idYesProduct id.
stockNoStock quantity (enables stock management).
statusNopublish, draft, pending, private or future.
sale_priceNoSame form as regular_price; empty clears the sale price.
regular_priceNoPlain number of at least 0, written with "." or the shop's own decimal separator and nothing else (no grouping, no exponent); empty clears the price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / id / description
      Added value: +"Product id."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark this destructive and non-idempotent, and the description adds substantial context beyond them: all-or-nothing validation, the exact failure modes that leave the product untouched, the required capabilities (manage_woocommerce, edit_product), the possibility of per-product capability withholding, and the notable absence of an undo point. That is exactly the extra behavioral context the annotations cannot convey.

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 the changed fields and the atomicity guarantee, then permissions, then the return shape. Dense but readable. The trailing AlphaBridge forwarding sentence is marginally useful transport context and slightly dilutes the focus, costing a point.

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?

With no output schema, the description explicitly names the return value ('updated' plus the product as wp_wc_get_product would show it), and covers mutation safety, permissions, platform requirement, and multi-site forwarding. An agent has everything needed to call this correctly or abstain.

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 parameter documentation is already complete and a 3 would be the floor. The description contributes the meaningful omission semantics — unspecified fields are untouched — which the schema does not state per-parameter, raising it 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 and enumerates exactly which fields can change (regular price, sale price, stock, status). It also implicitly distinguishes itself from wp_wc_get_product by referencing it as the read counterpart, so an agent can separate update from read/list siblings.

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?

The key operating rule is explicit: only the supplied fields change, and validation happens before any write. It does not, however, name alternatives such as wp_bulk_update_status or spell out when an agent should prefer a bulk operation, leaving routing to the sibling names alone.

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