Skip to main content
Glama
mcp-woocommerce

mcp-woocommerce

by zeusmyto

update_stock

Set a product's stock quantity by product ID. Use it to correct or sync inventory levels in WooCommerce, after confirming the change with the user.

Instructions

Set the stock quantity of a product. Requires WC_ALLOW_WRITE=true. Confirm with the user first.

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": {
      "product_id": "<product_id>",
      "quantity": "<quantity>"
    },
    "name": "update_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
quantityYes
product_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the whole behavioral burden, and it does disclose the important traits: this is a write, it is gated behind WC_ALLOW_WRITE=true, and it warrants user confirmation. It does not say whether the existing quantity is overwritten absolutely, whether negative values are rejected, or what the call returns, leaving material gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action, followed by the hard prerequisite and the safety instruction. Nothing is padded and no sentence is redundant.

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 two-parameter mutation with no annotations and no output schema, the description covers purpose, gating, and confirmation, which is the core. It remains incomplete on the semantics of the quantity value (absolute vs incremental, bounds) and on what happens after the call, which an agent would want before committing a stock change.

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

Parameters2/5

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

Schema description coverage is 0%, so the description needs to compensate for both parameters and largely does not. It implies product_id identifies the product and quantity is the new stock level, but never states that quantity is an absolute replacement rather than a delta, nor anything about integer units or bounds.

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?

The description pairs a specific verb with a specific resource: "Set the stock quantity of a product," which is unambiguous about the mutation target. It does not name or differentiate against any sibling, but none of the listed siblings (low_stock, get_product, list_orders, sales_summary, search_products) appear to be competing write paths, so the risk of misselection is low.

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?

"Requires WC_ALLOW_WRITE=true. Confirm with the user first." gives a concrete precondition and a procedural gate, which is real usage guidance rather than implied. It stops short of stating when a full recount versus a manual adjustment is appropriate, and gives no explicit exclusions, keeping it below a 5.

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