Inicio - Documentación - POM AI - 17 MCP - WooCommerce product tools - WooCommerce product tool reference

WooCommerce product tool reference

Fifteen tools for products, variations and attributes. Everything here is commercially live: a price written through these tools is on the storefront immediately.

Products

Tool Does Write
wc_get_products List products
wc_get_product Read one product
wc_create_product Create a product Yes
wc_update_product Update a product Yes
wc_get_store_stats Catalogue counts

Variations

Tool Does Write
wc_get_product_variations List a product's variations
wc_get_variation Read one variation
wc_create_variation Create a variation Yes
wc_update_variation Update a variation Yes
wc_delete_variation Delete a variation Yes
wc_batch_update_variations Update several at once Yes

Attributes

Tool Does Write
wc_get_product_attributes List global attributes
wc_get_attribute_terms List an attribute's terms
wc_create_product_attribute Create a global attribute Yes
wc_set_product_attributes Set a product's attributes Yes

Requirements

WooCommerce must be active, or none of these tools is registered — a client asking for one gets pom_ai_mcp_unknown_tool.

Permissions

Requires
Scopes, reads mcp:read, woocommerce:catalog:read
Scopes, writes mcp:write, woocommerce:catalog:write
Capability manage_woocommerce or edit_products
Write gate Allow WooCommerce catalog writes

The capability check accepts either of two capabilities, so a shop manager and a user with product editing rights both qualify.

Note that reading requires a capability too. Unlike published posts, which anyone authenticated can read, product data is behind the shop permission even though most of it is public on the storefront.

There is no product deletion tool

Deliberate, and worth knowing before planning a catalogue cleanup. Products can be created and updated through MCP, and removing one is a job for the WooCommerce admin.

Variations can be deleted. So can coupons — see Coupon tools.

Fields that sound alike and are not

The most common source of expensive mistakes in this chapter:

Field Is
regular_price The normal price
sale_price The discounted price, when on offer
price Read-only. The effective price WooCommerce computed

Writing regular_price on a product that is on sale changes nothing a customer sees, because the sale price still applies. Writing sale_price when you meant the regular price starts a sale.

price appears in every response and cannot be written. Use it to check the result, not to set it.

The same three exist on variations.

Stock has two independent parts

manage_stock turns stock tracking on or off; stock_quantity sets the number. Setting a quantity while stock management is off stores a number nothing uses.

Read the current state before changing either.

Dry runs

Every write tool supports dry_run. The two update tools return a genuine before and after; create and delete report what they would do.

For anything touching price or stock, use it every time. It is the cheapest possible check against a field mix-up.

Related