Skip to main content
Glama

woo_update_stock

Destructive

ACTION on the WooCommerce store. Sets the stock quantity of one product or variation (enables stock management on it). Returns before → after. In safe mode the first call returns a PREVIEW with confirm_id: show it and call again with confirm_id only after the user approves.

Input Schema

NameRequiredDescriptionDefault
quantityYes
store_idYes
confirm_idNoToken di conferma ritornato dall'anteprima. Ripassa lo STESSO payload + confirm_id per eseguire davvero la scrittura.
product_idYes
variation_idNoFor a variation of a variable product

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and openWorldHint=true, and the description earns its keep by adding the preview/confirm_id safe-mode flow and the non-obvious side effect that setting quantity also enables stock management on the product. It also discloses the return shape (before → after), which is useful for a destructive write. It does not warn that the quantity is an absolute overwrite of any existing value.

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 short front-loaded sentences, mutation and scope first, safety protocol last. Dense with no filler, though the parenthetical about enabling stock management is easy to miss mid-sentence.

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 destructive 5-parameter write with no output schema, the description covers purpose, scope, return value, and the approval protocol. The gaps are the store_id parameter and the exact confirm_id payload expectations, which the contradictory phrasing muddies rather than resolves.

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 coverage is only 40%, so the description carries weight — it does explain the product-vs-variation distinction and the confirm_id preview flow. But it conflicts with the schema on confirm_id ('call again with confirm_id only' versus the schema's 'resend the SAME payload + confirm_id'), and store_id is never addressed.

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 and resource — 'Sets the stock quantity of one product or variation' — and labels itself 'ACTION' to separate it from read tools like woo_get_stock or woo_list_products. It does not name the sibling it is not, but the mutation semantics are unambiguous.

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 operational context: use it to set stock on a single product or variation, and it spells out the safe-mode two-call procedure with user approval required before confirming. It stops short of routing the agent away from bulk_update_inventory or update_mfn_quantity for other stock scenarios.

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