@respira/wordpress-mcp-server 7.2.18 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAoUzE,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAwB;IAC9C,OAAO,CAAC,YAAY,CAA4B;IAChD,8EAA8E;IAC9E,OAAO,CAAC,YAAY,CAA4B;IAChD,8EAA8E;IAC9E,OAAO,CAAC,mBAAmB,CAAS;IACpC,+EAA+E;IAC/E,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,4BAA4B,CAAU;IAE9D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAsB;IAEhE;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;gBA4Bb,WAAW,EAAE,mBAAmB,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE;IAsVvE,OAAO,CAAC,cAAc;IAItB;;;;;;;;;;;;;;;;;;OAkBG;YACW,uBAAuB;IA0GrC;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,aAAa;IA4BrB,gEAAgE;IAChE,OAAO,CAAC,aAAa;IAUrB;;;;;;OAMG;YACW,UAAU;IAgDxB;;;;;;;;;;;;;;OAcG;YACW,WAAW;IAiJzB;;;;;;;;;OASG;YACW,kBAAkB;IAyIhC;;;;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OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAU;IAElD;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAQ7C;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAQ3C;IAEF,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,+BAA+B,CAAY;IAEnE,uEAAuE;IACvE,OAAO,CAAC,MAAM,CAAC,SAAS;YAWV,oBAAoB;YAqFpB,2BAA2B;IAazC;;;;OAIG;YACW,cAAc;IAY5B,OAAO,CAAC,mBAAmB;IAw0B3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAe3C;IAEF;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;YAmCpB,cAAc;IAqG5B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,eAAe;YAuCT,gBAAgB;IAwgC9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAkXzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CAyCV"}
package/dist/server.js CHANGED
@@ -4992,6 +4992,525 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
4992
4992
  },
4993
4993
  readOnlyHint: true,
4994
4994
  },
4995
+ // --- Brands (addon v3.0) ---
4996
+ {
4997
+ name: 'woocommerce_list_brands',
4998
+ description: 'List product brands (WooCommerce 9.4+ product_brand taxonomy).',
4999
+ inputSchema: {
5000
+ type: 'object',
5001
+ properties: {
5002
+ search: { type: 'string', description: 'Search brands by name' },
5003
+ per_page: { type: 'number', description: 'Brands per page (1-100)' },
5004
+ page: { type: 'number', description: 'Page number' },
5005
+ hide_empty: { type: 'boolean', description: 'Only brands with products' },
5006
+ },
5007
+ },
5008
+ readOnlyHint: true,
5009
+ },
5010
+ {
5011
+ name: 'woocommerce_get_brand',
5012
+ description: 'Get a single product brand.',
5013
+ inputSchema: {
5014
+ type: 'object',
5015
+ properties: {
5016
+ id: { type: 'number', description: 'Brand (term) ID' },
5017
+ },
5018
+ required: ['id'],
5019
+ },
5020
+ readOnlyHint: true,
5021
+ },
5022
+ {
5023
+ name: 'woocommerce_create_brand',
5024
+ description: 'Create a product brand.',
5025
+ inputSchema: {
5026
+ type: 'object',
5027
+ properties: {
5028
+ name: { type: 'string', description: 'Brand name' },
5029
+ slug: { type: 'string', description: 'Optional slug' },
5030
+ description: { type: 'string', description: 'Optional description' },
5031
+ },
5032
+ required: ['name'],
5033
+ },
5034
+ },
5035
+ {
5036
+ name: 'woocommerce_update_brand',
5037
+ description: 'Update a product brand.',
5038
+ inputSchema: {
5039
+ type: 'object',
5040
+ properties: {
5041
+ id: { type: 'number', description: 'Brand (term) ID' },
5042
+ name: { type: 'string' },
5043
+ slug: { type: 'string' },
5044
+ description: { type: 'string' },
5045
+ },
5046
+ required: ['id'],
5047
+ },
5048
+ idempotentHint: true,
5049
+ },
5050
+ {
5051
+ name: 'woocommerce_delete_brand',
5052
+ description: 'Delete a product brand.',
5053
+ inputSchema: {
5054
+ type: 'object',
5055
+ properties: {
5056
+ id: { type: 'number', description: 'Brand (term) ID' },
5057
+ },
5058
+ required: ['id'],
5059
+ },
5060
+ destructiveHint: true,
5061
+ },
5062
+ // --- Catalog operations (addon v3.0 exposes existing REST tools) ---
5063
+ {
5064
+ name: 'woocommerce_list_products_advanced',
5065
+ description: 'List products with advanced filters: category, tag, stock status, on-sale, featured, price range.',
5066
+ inputSchema: {
5067
+ type: 'object',
5068
+ properties: {
5069
+ status: { type: 'string', description: 'publish, draft, pending, any' },
5070
+ category: { type: 'string', description: 'Category slug' },
5071
+ tag: { type: 'string', description: 'Tag slug' },
5072
+ stock_status: { type: 'string', description: 'instock, outofstock, onbackorder' },
5073
+ on_sale: { type: 'boolean' },
5074
+ featured: { type: 'boolean' },
5075
+ min_price: { type: 'number' },
5076
+ max_price: { type: 'number' },
5077
+ orderby: { type: 'string' },
5078
+ order: { type: 'string', description: 'ASC or DESC' },
5079
+ per_page: { type: 'number' },
5080
+ page: { type: 'number' },
5081
+ },
5082
+ },
5083
+ readOnlyHint: true,
5084
+ },
5085
+ {
5086
+ name: 'woocommerce_find_product',
5087
+ description: 'Find products by natural-language query across titles, descriptions, SKUs, and categories, ranked by relevance.',
5088
+ inputSchema: {
5089
+ type: 'object',
5090
+ properties: {
5091
+ query: { type: 'string', description: 'Natural-language product description' },
5092
+ limit: { type: 'number', description: 'Max results (1-20, default 5)' },
5093
+ },
5094
+ required: ['query'],
5095
+ },
5096
+ readOnlyHint: true,
5097
+ },
5098
+ {
5099
+ name: 'woocommerce_catalog_health',
5100
+ description: 'Audit the catalog: missing images, thin descriptions, uncategorized products, missing prices, stock inconsistencies. Returns a 0-100 health score.',
5101
+ inputSchema: {
5102
+ type: 'object',
5103
+ properties: {},
5104
+ },
5105
+ readOnlyHint: true,
5106
+ },
5107
+ {
5108
+ name: 'woocommerce_bulk_update_products',
5109
+ description: 'Update up to 100 products in one call (name, descriptions, status, featured, visibility). Snapshots before/after; dry_run supported.',
5110
+ inputSchema: {
5111
+ type: 'object',
5112
+ properties: {
5113
+ updates: {
5114
+ type: 'array',
5115
+ items: { type: 'object' },
5116
+ description: 'Each: {id, name?, description?, short_description?, status?, featured?, catalog_visibility?}',
5117
+ },
5118
+ dry_run: { type: 'boolean', description: 'Preview without writing' },
5119
+ },
5120
+ required: ['updates'],
5121
+ },
5122
+ },
5123
+ // --- Pricing (addon v3.0 exposes existing REST tools) ---
5124
+ {
5125
+ name: 'woocommerce_bulk_update_prices',
5126
+ description: 'Bulk-change prices (percentage, absolute delta, or set value) for up to 100 products by IDs or category. Snapshots; dry_run supported.',
5127
+ inputSchema: {
5128
+ type: 'object',
5129
+ properties: {
5130
+ product_ids: { type: 'array', items: { type: 'number' } },
5131
+ category: { type: 'string', description: 'Category slug (alternative to product_ids)' },
5132
+ change_type: { type: 'string', description: 'percentage, absolute, or set_value' },
5133
+ change_value: { type: 'number', description: 'e.g. -10 for a 10% cut with change_type percentage' },
5134
+ apply_to: { type: 'string', description: 'regular_price, sale_price, or both' },
5135
+ dry_run: { type: 'boolean' },
5136
+ },
5137
+ required: ['change_value'],
5138
+ },
5139
+ },
5140
+ {
5141
+ name: 'woocommerce_schedule_sale',
5142
+ description: 'Schedule sale prices with start/end dates for up to 100 products. Snapshots; dry_run supported.',
5143
+ inputSchema: {
5144
+ type: 'object',
5145
+ properties: {
5146
+ product_ids: { type: 'array', items: { type: 'number' } },
5147
+ sale_price: { type: 'number' },
5148
+ start_date: { type: 'string', description: 'ISO 8601 date' },
5149
+ end_date: { type: 'string', description: 'ISO 8601 date' },
5150
+ dry_run: { type: 'boolean' },
5151
+ },
5152
+ required: ['product_ids'],
5153
+ },
5154
+ },
5155
+ {
5156
+ name: 'woocommerce_revert_pricing',
5157
+ description: 'Revert a product\'s pricing to a Respira snapshot taken before a commerce edit.',
5158
+ inputSchema: {
5159
+ type: 'object',
5160
+ properties: {
5161
+ product_id: { type: 'number' },
5162
+ snapshot_id: { type: 'number' },
5163
+ },
5164
+ required: ['product_id', 'snapshot_id'],
5165
+ },
5166
+ idempotentHint: true,
5167
+ },
5168
+ // --- Inventory (addon v3.0 exposes existing REST tools) ---
5169
+ {
5170
+ name: 'woocommerce_bulk_update_stock',
5171
+ description: 'Set, increase, or decrease stock for up to 100 products in one call. Snapshots; dry_run supported.',
5172
+ inputSchema: {
5173
+ type: 'object',
5174
+ properties: {
5175
+ updates: {
5176
+ type: 'array',
5177
+ items: { type: 'object' },
5178
+ description: 'Each: {id, quantity, operation: "set"|"increase"|"decrease"}',
5179
+ },
5180
+ dry_run: { type: 'boolean' },
5181
+ },
5182
+ required: ['updates'],
5183
+ },
5184
+ },
5185
+ {
5186
+ name: 'woocommerce_find_low_stock',
5187
+ description: 'List products at or below a stock threshold (defaults to the WooCommerce low-stock setting), sorted by urgency.',
5188
+ inputSchema: {
5189
+ type: 'object',
5190
+ properties: {
5191
+ threshold: { type: 'number' },
5192
+ },
5193
+ },
5194
+ readOnlyHint: true,
5195
+ },
5196
+ // --- Storefront intelligence (addon v3.0 exposes existing REST tools) ---
5197
+ {
5198
+ name: 'woocommerce_analyze_shop_page',
5199
+ description: 'Analyze the shop page through the page-builder layer: product grids, hierarchy score, issues, recommendations.',
5200
+ inputSchema: {
5201
+ type: 'object',
5202
+ properties: {
5203
+ page_id: { type: 'number', description: 'Defaults to the WooCommerce shop page' },
5204
+ },
5205
+ },
5206
+ readOnlyHint: true,
5207
+ },
5208
+ {
5209
+ name: 'woocommerce_analyze_product_page',
5210
+ description: 'Quality-score a single product page: images, gallery, description depth, price, category.',
5211
+ inputSchema: {
5212
+ type: 'object',
5213
+ properties: {
5214
+ product_id: { type: 'number' },
5215
+ },
5216
+ required: ['product_id'],
5217
+ },
5218
+ readOnlyHint: true,
5219
+ },
5220
+ {
5221
+ name: 'woocommerce_update_product_card_layout',
5222
+ description: 'Change product grid layout (columns, rows, ordering) on archive pages through the page-builder layer. Snapshots; dry_run supported.',
5223
+ inputSchema: {
5224
+ type: 'object',
5225
+ properties: {
5226
+ page_id: { type: 'number', description: 'Defaults to the shop page' },
5227
+ changes: { type: 'object', description: 'e.g. {columns: 4, rows: 3, orderby: "popularity"}' },
5228
+ dry_run: { type: 'boolean' },
5229
+ },
5230
+ required: ['changes'],
5231
+ },
5232
+ },
5233
+ {
5234
+ name: 'woocommerce_add_low_stock_badge',
5235
+ description: 'Find products under a stock threshold and produce badge data (e.g. "Only 3 left") for product cards.',
5236
+ inputSchema: {
5237
+ type: 'object',
5238
+ properties: {
5239
+ page_id: { type: 'number' },
5240
+ threshold: { type: 'number', description: 'Default 5' },
5241
+ badge_text: { type: 'string', description: 'Default "Only {qty} left"' },
5242
+ badge_style: { type: 'string' },
5243
+ dry_run: { type: 'boolean' },
5244
+ },
5245
+ },
5246
+ readOnlyHint: true,
5247
+ },
5248
+ {
5249
+ name: 'woocommerce_add_sale_badge',
5250
+ description: 'List on-sale products with computed discount percentages and badge data for product cards.',
5251
+ inputSchema: {
5252
+ type: 'object',
5253
+ properties: {
5254
+ page_id: { type: 'number' },
5255
+ dry_run: { type: 'boolean' },
5256
+ },
5257
+ },
5258
+ readOnlyHint: true,
5259
+ },
5260
+ {
5261
+ name: 'woocommerce_update_checkout_layout',
5262
+ description: 'Apply layout changes to the checkout page through the page-builder layer. Snapshots; dry_run supported.',
5263
+ inputSchema: {
5264
+ type: 'object',
5265
+ properties: {
5266
+ page_id: { type: 'number', description: 'Defaults to the checkout page' },
5267
+ changes: { type: 'object' },
5268
+ dry_run: { type: 'boolean' },
5269
+ },
5270
+ required: ['changes'],
5271
+ },
5272
+ },
5273
+ // --- Variations and attributes (addon v3.0) ---
5274
+ {
5275
+ name: 'woocommerce_set_product_attributes',
5276
+ description: 'Set global (taxonomy) or custom attributes on a product; missing terms are created. Mark variation: true to use for variations. Snapshots.',
5277
+ inputSchema: {
5278
+ type: 'object',
5279
+ properties: {
5280
+ id: { type: 'number', description: 'Product ID' },
5281
+ attributes: {
5282
+ type: 'array',
5283
+ items: { type: 'object' },
5284
+ description: 'Each: {name, options: [..], visible?, variation?, position?}',
5285
+ },
5286
+ replace: { type: 'boolean', description: 'false merges with existing attributes (default true)' },
5287
+ },
5288
+ required: ['id', 'attributes'],
5289
+ },
5290
+ idempotentHint: true,
5291
+ },
5292
+ {
5293
+ name: 'woocommerce_generate_variations',
5294
+ description: 'Create all missing variations from the product\'s variation attributes (cartesian product), up to 100 per call. Snapshots; dry_run supported.',
5295
+ inputSchema: {
5296
+ type: 'object',
5297
+ properties: {
5298
+ id: { type: 'number', description: 'Variable product ID' },
5299
+ limit: { type: 'number', description: 'Max variations to create this call (default 50, max 100)' },
5300
+ defaults: { type: 'object', description: 'Applied to each created variation: {regular_price?, stock_quantity?}' },
5301
+ dry_run: { type: 'boolean' },
5302
+ },
5303
+ required: ['id'],
5304
+ },
5305
+ },
5306
+ {
5307
+ name: 'woocommerce_create_variation',
5308
+ description: 'Create one variation with explicit attribute values, price, SKU, stock, and image. Snapshots.',
5309
+ inputSchema: {
5310
+ type: 'object',
5311
+ properties: {
5312
+ id: { type: 'number', description: 'Variable product ID' },
5313
+ attributes: { type: 'object', description: 'e.g. {"pa_color": "red", "size": "M"}' },
5314
+ regular_price: { type: 'string' },
5315
+ sale_price: { type: 'string' },
5316
+ sku: { type: 'string' },
5317
+ stock_quantity: { type: 'number' },
5318
+ image_id: { type: 'number' },
5319
+ description: { type: 'string' },
5320
+ status: { type: 'string', description: 'Default publish' },
5321
+ },
5322
+ required: ['id', 'attributes'],
5323
+ },
5324
+ },
5325
+ {
5326
+ name: 'woocommerce_create_global_attribute',
5327
+ description: 'Create a global product attribute with terms. Supports the WooCommerce 10.9 wc-visual type for per-term color/image swatches.',
5328
+ inputSchema: {
5329
+ type: 'object',
5330
+ properties: {
5331
+ name: { type: 'string' },
5332
+ slug: { type: 'string' },
5333
+ type: { type: 'string', description: 'select (default) or wc-visual (WooCommerce 10.9+ with the Color swatches feature enabled)' },
5334
+ terms: {
5335
+ type: 'array',
5336
+ items: { type: 'object' },
5337
+ description: 'Each: {name, slug?, color? (hex, wc-visual), image_id? (wc-visual)}',
5338
+ },
5339
+ },
5340
+ required: ['name'],
5341
+ },
5342
+ },
5343
+ {
5344
+ name: 'woocommerce_set_variation_gallery',
5345
+ description: 'Set a variation\'s image (first ID) and, when a variation-gallery plugin is active, its gallery (remaining IDs). Snapshots.',
5346
+ inputSchema: {
5347
+ type: 'object',
5348
+ properties: {
5349
+ id: { type: 'number', description: 'Variation ID' },
5350
+ image_ids: { type: 'array', items: { type: 'number' }, description: 'Attachment IDs; first becomes the variation image' },
5351
+ },
5352
+ required: ['id', 'image_ids'],
5353
+ },
5354
+ idempotentHint: true,
5355
+ },
5356
+ // --- Coupons and customers (addon v3.0) ---
5357
+ {
5358
+ name: 'woocommerce_list_coupons',
5359
+ description: 'List coupons with optional search.',
5360
+ inputSchema: {
5361
+ type: 'object',
5362
+ properties: {
5363
+ search: { type: 'string' },
5364
+ per_page: { type: 'number' },
5365
+ page: { type: 'number' },
5366
+ },
5367
+ },
5368
+ readOnlyHint: true,
5369
+ },
5370
+ {
5371
+ name: 'woocommerce_create_coupon',
5372
+ description: 'Create a coupon: percent or fixed discount, expiry, usage limits, product and email restrictions.',
5373
+ inputSchema: {
5374
+ type: 'object',
5375
+ properties: {
5376
+ code: { type: 'string' },
5377
+ discount_type: { type: 'string', description: 'percent, fixed_cart, or fixed_product' },
5378
+ amount: { type: 'number' },
5379
+ description: { type: 'string' },
5380
+ date_expires: { type: 'string', description: 'ISO 8601 date' },
5381
+ free_shipping: { type: 'boolean' },
5382
+ individual_use: { type: 'boolean' },
5383
+ exclude_sale_items: { type: 'boolean' },
5384
+ minimum_amount: { type: 'number' },
5385
+ maximum_amount: { type: 'number' },
5386
+ usage_limit: { type: 'number' },
5387
+ usage_limit_per_user: { type: 'number' },
5388
+ product_ids: { type: 'array', items: { type: 'number' } },
5389
+ excluded_product_ids: { type: 'array', items: { type: 'number' } },
5390
+ email_restrictions: { type: 'array', items: { type: 'string' } },
5391
+ },
5392
+ required: ['code'],
5393
+ },
5394
+ },
5395
+ {
5396
+ name: 'woocommerce_update_coupon',
5397
+ description: 'Update any coupon field by coupon ID.',
5398
+ inputSchema: {
5399
+ type: 'object',
5400
+ properties: {
5401
+ id: { type: 'number', description: 'Coupon ID' },
5402
+ code: { type: 'string' },
5403
+ discount_type: { type: 'string' },
5404
+ amount: { type: 'number' },
5405
+ date_expires: { type: 'string' },
5406
+ usage_limit: { type: 'number' },
5407
+ free_shipping: { type: 'boolean' },
5408
+ },
5409
+ required: ['id'],
5410
+ },
5411
+ idempotentHint: true,
5412
+ },
5413
+ {
5414
+ name: 'woocommerce_create_customer',
5415
+ description: 'Create a WooCommerce customer with optional billing/shipping addresses. Passwords auto-generate when omitted and are never returned.',
5416
+ inputSchema: {
5417
+ type: 'object',
5418
+ properties: {
5419
+ email: { type: 'string' },
5420
+ username: { type: 'string' },
5421
+ first_name: { type: 'string' },
5422
+ last_name: { type: 'string' },
5423
+ billing: { type: 'object', description: 'Address fields: first_name, last_name, company, address_1, address_2, city, state, postcode, country, phone, email' },
5424
+ shipping: { type: 'object' },
5425
+ },
5426
+ required: ['email'],
5427
+ },
5428
+ },
5429
+ {
5430
+ name: 'woocommerce_update_customer',
5431
+ description: 'Update a customer\'s name, email, billing, or shipping details by user ID.',
5432
+ inputSchema: {
5433
+ type: 'object',
5434
+ properties: {
5435
+ id: { type: 'number', description: 'Customer (user) ID' },
5436
+ email: { type: 'string' },
5437
+ first_name: { type: 'string' },
5438
+ last_name: { type: 'string' },
5439
+ billing: { type: 'object' },
5440
+ shipping: { type: 'object' },
5441
+ },
5442
+ required: ['id'],
5443
+ },
5444
+ idempotentHint: true,
5445
+ },
5446
+ // --- Order notes and refunds (addon v3.0) ---
5447
+ {
5448
+ name: 'woocommerce_add_order_note',
5449
+ description: 'Add a note to an order. Private by default; customer_note: true emails the customer.',
5450
+ inputSchema: {
5451
+ type: 'object',
5452
+ properties: {
5453
+ id: { type: 'number', description: 'Order ID' },
5454
+ note: { type: 'string' },
5455
+ customer_note: { type: 'boolean', description: 'Default false (private note)' },
5456
+ },
5457
+ required: ['id', 'note'],
5458
+ },
5459
+ },
5460
+ {
5461
+ name: 'woocommerce_get_order_refunds',
5462
+ description: 'List refunds on an order with total refunded and remaining refundable amounts.',
5463
+ inputSchema: {
5464
+ type: 'object',
5465
+ properties: {
5466
+ id: { type: 'number', description: 'Order ID' },
5467
+ },
5468
+ required: ['id'],
5469
+ },
5470
+ readOnlyHint: true,
5471
+ },
5472
+ {
5473
+ name: 'woocommerce_create_order_refund',
5474
+ description: 'Refund an order. DRY-RUN BY DEFAULT: pass dry_run: false to execute. Gateway money movement is opt-in via refund_payment: true.',
5475
+ inputSchema: {
5476
+ type: 'object',
5477
+ properties: {
5478
+ id: { type: 'number', description: 'Order ID' },
5479
+ amount: { type: 'number', description: 'Defaults to the full remaining refundable amount' },
5480
+ reason: { type: 'string' },
5481
+ line_items: { type: 'array', items: { type: 'object' }, description: 'Each: {item_id, quantity?, total?}' },
5482
+ refund_payment: { type: 'boolean', description: 'true asks the payment gateway to return the money (default false)' },
5483
+ restock_items: { type: 'boolean', description: 'Default true' },
5484
+ dry_run: { type: 'boolean', description: 'Default TRUE: preview only' },
5485
+ },
5486
+ required: ['id'],
5487
+ },
5488
+ destructiveHint: true,
5489
+ },
5490
+ // --- AI readiness (addon v3.0) ---
5491
+ {
5492
+ name: 'woocommerce_product_ai_readiness',
5493
+ description: 'Score how well one product is described for AI shopping assistants: description depth, images/alt text, price, SKU, GTIN, brand, attributes, availability.',
5494
+ inputSchema: {
5495
+ type: 'object',
5496
+ properties: {
5497
+ id: { type: 'number', description: 'Product ID' },
5498
+ },
5499
+ required: ['id'],
5500
+ },
5501
+ readOnlyHint: true,
5502
+ },
5503
+ {
5504
+ name: 'woocommerce_catalog_ai_readiness',
5505
+ description: 'Score the whole catalog for AI shopping readiness: average score, distribution, top issues, weakest products.',
5506
+ inputSchema: {
5507
+ type: 'object',
5508
+ properties: {
5509
+ limit: { type: 'number', description: 'Products to scan (default 200, max 500)' },
5510
+ },
5511
+ },
5512
+ readOnlyHint: true,
5513
+ },
4995
5514
  ];
4996
5515
  }
4997
5516
  /**
@@ -5770,6 +6289,95 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
5770
6289
  }
5771
6290
  case 'woocommerce_sales_report':
5772
6291
  return await client.woocommerceSalesReport(args);
6292
+ // --- WooCommerce Add-on v3.0 ---
6293
+ case 'woocommerce_list_brands':
6294
+ return await client.woocommerceListBrands(args);
6295
+ case 'woocommerce_get_brand':
6296
+ return await client.woocommerceGetBrand(args.id);
6297
+ case 'woocommerce_create_brand':
6298
+ return await client.woocommerceCreateBrand(args);
6299
+ case 'woocommerce_update_brand': {
6300
+ const { id, ...payload } = args;
6301
+ return await client.woocommerceUpdateBrand(id, payload);
6302
+ }
6303
+ case 'woocommerce_delete_brand':
6304
+ return await client.woocommerceDeleteBrand(args.id);
6305
+ case 'woocommerce_list_products_advanced':
6306
+ return await client.woocommerceListProductsAdvanced(args);
6307
+ case 'woocommerce_find_product':
6308
+ return await client.woocommerceFindProduct(args);
6309
+ case 'woocommerce_catalog_health':
6310
+ return await client.woocommerceCatalogHealth();
6311
+ case 'woocommerce_bulk_update_products':
6312
+ return await client.woocommerceBulkUpdateProducts(args);
6313
+ case 'woocommerce_bulk_update_prices':
6314
+ return await client.woocommerceBulkUpdatePrices(args);
6315
+ case 'woocommerce_schedule_sale':
6316
+ return await client.woocommerceScheduleSale(args);
6317
+ case 'woocommerce_revert_pricing':
6318
+ return await client.woocommerceRevertPricing(args);
6319
+ case 'woocommerce_bulk_update_stock':
6320
+ return await client.woocommerceBulkUpdateStock(args);
6321
+ case 'woocommerce_find_low_stock':
6322
+ return await client.woocommerceFindLowStock(args);
6323
+ case 'woocommerce_analyze_shop_page':
6324
+ return await client.woocommerceAnalyzeShopPage(args);
6325
+ case 'woocommerce_analyze_product_page':
6326
+ return await client.woocommerceAnalyzeProductPage(args);
6327
+ case 'woocommerce_update_product_card_layout':
6328
+ return await client.woocommerceUpdateProductCardLayout(args);
6329
+ case 'woocommerce_add_low_stock_badge':
6330
+ return await client.woocommerceAddLowStockBadge(args);
6331
+ case 'woocommerce_add_sale_badge':
6332
+ return await client.woocommerceAddSaleBadge(args);
6333
+ case 'woocommerce_update_checkout_layout':
6334
+ return await client.woocommerceUpdateCheckoutLayout(args);
6335
+ case 'woocommerce_set_product_attributes': {
6336
+ const { id, ...payload } = args;
6337
+ return await client.woocommerceSetProductAttributes(id, payload);
6338
+ }
6339
+ case 'woocommerce_generate_variations': {
6340
+ const { id, ...payload } = args;
6341
+ return await client.woocommerceGenerateVariations(id, payload);
6342
+ }
6343
+ case 'woocommerce_create_variation': {
6344
+ const { id, ...payload } = args;
6345
+ return await client.woocommerceCreateVariation(id, payload);
6346
+ }
6347
+ case 'woocommerce_create_global_attribute':
6348
+ return await client.woocommerceCreateGlobalAttribute(args);
6349
+ case 'woocommerce_set_variation_gallery': {
6350
+ const { id, ...payload } = args;
6351
+ return await client.woocommerceSetVariationGallery(id, payload);
6352
+ }
6353
+ case 'woocommerce_list_coupons':
6354
+ return await client.woocommerceListCoupons(args);
6355
+ case 'woocommerce_create_coupon':
6356
+ return await client.woocommerceCreateCoupon(args);
6357
+ case 'woocommerce_update_coupon': {
6358
+ const { id, ...payload } = args;
6359
+ return await client.woocommerceUpdateCoupon(id, payload);
6360
+ }
6361
+ case 'woocommerce_create_customer':
6362
+ return await client.woocommerceCreateCustomer(args);
6363
+ case 'woocommerce_update_customer': {
6364
+ const { id, ...payload } = args;
6365
+ return await client.woocommerceUpdateCustomer(id, payload);
6366
+ }
6367
+ case 'woocommerce_add_order_note': {
6368
+ const { id, ...payload } = args;
6369
+ return await client.woocommerceAddOrderNote(id, payload);
6370
+ }
6371
+ case 'woocommerce_get_order_refunds':
6372
+ return await client.woocommerceGetOrderRefunds(args.id);
6373
+ case 'woocommerce_create_order_refund': {
6374
+ const { id, ...payload } = args;
6375
+ return await client.woocommerceCreateOrderRefund(id, payload);
6376
+ }
6377
+ case 'woocommerce_product_ai_readiness':
6378
+ return await client.woocommerceProductAiReadiness(args.id);
6379
+ case 'woocommerce_catalog_ai_readiness':
6380
+ return await client.woocommerceCatalogAiReadiness(args);
5773
6381
  // --- v5.2.0 Elemental tools ---
5774
6382
  case 'wordpress_find_element': {
5775
6383
  const { post_id, ...rest } = args;