Delete Product


Deletes a WooCommerce product. By default this moves it to the trash; pass force to delete it permanently, bypassing the trash.

Also known as: remove a product, take a product down.

Property Value
Ability slug mosmcp/delete-product
Wire tool name mosmcp__delete-product
Category WooCommerce (mosmcp-woocommerce)
Plan Free

 

Required access

Requirement Value
Capability delete_products
Minimum default role Shop manager
Requires WooCommerce
Annotations readOnly: false · destructive: true · idempotent: true · openWorld: true

 

Input schema

Field Type Required Default Description
id integer Yes — The product ID to delete (required).
force boolean false Permanently delete instead of moving to trash. Defaults to false.

 

Output schema

Field Type Required
success boolean
message string
data object
data.id integer Yes
data.status string Yes
meta object
meta.ability string
meta.timestamp string
meta.execution_time string \| null

 

Example

Sample prompt
Remove product 42 from the shop.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 364,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__delete-product",
    "arguments": {
      "input": {
        "id": 42
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 364,
  "result": {
    "isError": false,
    "structuredContent": {
      "success": true,
      "message": "Product moved to trash.",
      "data": {
        "id": 42,
        "status": "trashed"
      },
      "meta": {
        "ability": "mosmcp/delete-product",
        "timestamp": "2026-09-29T10:15:00+00:00",
        "execution_time": "18.4ms"
      }
    }
  }
}

 

Edge cases / errors

  • Without force the product goes to the trash (status "trashed") and can be restored; force: true deletes it permanently (status "deleted").
  • Unknown product → wcab_product_not_found; caller can't delete that product → wcab_cannot_delete.
  • WooCommerce refuses the delete → wcab_product_delete_failed.

 


<< Previous Next >>
Delete Order Delete Product Category

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.