@diviops/mcp-server 1.5.16 → 1.5.17
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.
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3126,7 +3126,7 @@ function registerProTools() {
|
|
|
3126
3126
|
}, { target: "fluentcart", capabilityKey: "fluentcart_product_list" });
|
|
3127
3127
|
// diviops_fc_product_get — bridges /diviops/v1/pro/fluentcart/products/{id}
|
|
3128
3128
|
registerProTool("diviops_fc_product_get", {
|
|
3129
|
-
description: "Fetch a single FluentCart Pro product by ID, including the ProductDetail row and a list of variation IDs (Pro tier; requires FluentCart Pro installed + activated). Read-only. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; the success payload is { product: { id, title, slug, status, created_at, modified_at, variation_type, variants_count, min_price, max_price, stock_availability, excerpt, content, author_id, view_url, edit_url }, detail: { fulfillment_type, variation_type, min_price, max_price, manage_stock, manage_downloadable, stock_availability, default_variation_id, ... } | null, variation_ids: number[], variations_count }. Use the variation_ids list to follow up with a (future) diviops_fc_variation_list call. Error codes: invalid_input (HTTP 400) when id is not a positive integer; not_found (HTTP 404) when no product matches the ID (or it's filtered out by the FluentCart auto-draft global scope); fluentcart.module_inactive (HTTP 412) when FluentCart is uninstalled or the module toggle is off; fluentcart.query_failed (HTTP 500) when the FluentCart model query raises an exception.",
|
|
3129
|
+
description: "Fetch a single FluentCart Pro product by ID, including the ProductDetail row, the default-variation read-back fields, and a list of variation IDs (Pro tier; requires FluentCart Pro installed + activated). Read-only. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; the success payload is { product: { id, title, slug, status, created_at, modified_at, variation_type, variants_count, min_price, max_price, stock_availability, excerpt, content, author_id, view_url, edit_url }, detail: { fulfillment_type, variation_type, min_price, max_price, manage_stock, manage_downloadable, stock_availability, default_variation_id, ... } | null, default_variation: { id, sku, item_price, compare_price } | null, variation_ids: number[], variations_count }. The default_variation block closes the read-after-write loop for the V2 simple-product write tools — sku and compare_price round-trip cleanly without a FluentCart admin fallback. Unit asymmetry: product_create / product_update accept price and compare_price in currency units (e.g. 29.99); product_get returns min_price, max_price, default_variation.item_price, and default_variation.compare_price in stored cents (e.g. 2999). default_variation.sku is null when the stored SKU is SQL NULL; clearing a SKU with sku: \"\" on update reads back as null. default_variation itself is null when the product has no default variation row. Use the variation_ids list to follow up with a (future) diviops_fc_variation_list call. Error codes: invalid_input (HTTP 400) when id is not a positive integer; not_found (HTTP 404) when no product matches the ID (or it's filtered out by the FluentCart auto-draft global scope); fluentcart.module_inactive (HTTP 412) when FluentCart is uninstalled or the module toggle is off; fluentcart.query_failed (HTTP 500) when the FluentCart model query raises an exception.",
|
|
3130
3130
|
inputSchema: {
|
|
3131
3131
|
id: z
|
|
3132
3132
|
.number()
|
|
@@ -3156,7 +3156,7 @@ function registerProTools() {
|
|
|
3156
3156
|
// surface can own multi-variant complexity cleanly.
|
|
3157
3157
|
// diviops_fc_product_create — POST /diviops/v1/pro/fluentcart/products/create
|
|
3158
3158
|
registerProTool("diviops_fc_product_create", {
|
|
3159
|
-
description: "Create a simple FluentCart Pro product (Pro tier; requires FluentCart Pro installed + activated). V2 scope: simple onetime products only — one default variant, `detail.variation_type=\"simple\"`, `payment_type=\"onetime\"`, `fulfillment_type=\"digital\"|\"physical\"`. Multi-variation, subscriptions, downloadables, gallery, taxonomies, activation_limit, and license-flow fields ship in later verticals and are refused here. Required: `title` (1-200 chars). Optional: `status` (`draft`|`publish`|`pending`|`private`; default `draft`), `content`, `excerpt`, `fulfillment_type` (default `digital`), `price` (≥0; default 0), `compare_price` (≥0; must be ≥ `price` when provided), `sku` (unique across variations). Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; apply-mode success payload is { product, detail, variation_ids, variations_count, product_id, detail_id, default_variation_id } (HTTP 201). Error codes: invalid_input (400) when any input violates the constraints above; fluentcart.sku_conflict (409) when the provided SKU is already in use; fluentcart.module_inactive (412); fluentcart.command_failed (500) when wp_insert_post/ProductDetail/ProductVariation creation raises. Idempotency: NOT idempotent — repeat calls create distinct products." +
|
|
3159
|
+
description: "Create a simple FluentCart Pro product (Pro tier; requires FluentCart Pro installed + activated). V2 scope: simple onetime products only — one default variant, `detail.variation_type=\"simple\"`, `payment_type=\"onetime\"`, `fulfillment_type=\"digital\"|\"physical\"`. Multi-variation, subscriptions, downloadables, gallery, taxonomies, activation_limit, and license-flow fields ship in later verticals and are refused here. Required: `title` (1-200 chars). Optional: `status` (`draft`|`publish`|`pending`|`private`; default `draft`), `content`, `excerpt`, `fulfillment_type` (default `digital`), `price` (≥0; default 0), `compare_price` (≥0; must be ≥ `price` when provided), `sku` (unique across variations). Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; apply-mode success payload is { product, detail, default_variation: { id, sku, item_price, compare_price } | null, variation_ids, variations_count, product_id, detail_id, default_variation_id } (HTTP 201). The default_variation block mirrors the diviops_fc_product_get read-back shape so callers don't need a follow-up read to confirm sku / compare_price / item_price after a write. Unit asymmetry: write inputs (price, compare_price) are in currency units (e.g. 29.99); the default_variation block returns item_price + compare_price in stored cents (e.g. 2999), matching detail.min_price / max_price. default_variation.compare_price is null when no compare price is stored (FCP persists \"no compare\" as 0, normalized to null on read); default_variation.sku is null when the SKU column is SQL NULL or an empty string (the create path stores omitted SKU as NULL). Error codes: invalid_input (400) when any input violates the constraints above; fluentcart.sku_conflict (409) when the provided SKU is already in use; fluentcart.module_inactive (412); fluentcart.command_failed (500) when wp_insert_post/ProductDetail/ProductVariation creation raises. Idempotency: NOT idempotent — repeat calls create distinct products." +
|
|
3160
3160
|
DRY_RUN_DESC_SUFFIX,
|
|
3161
3161
|
inputSchema: {
|
|
3162
3162
|
title: z
|
|
@@ -3228,7 +3228,7 @@ function registerProTools() {
|
|
|
3228
3228
|
}, { target: "fluentcart", capabilityKey: "fluentcart_product_create" });
|
|
3229
3229
|
// diviops_fc_product_update — POST /diviops/v1/pro/fluentcart/products/{id}/update
|
|
3230
3230
|
registerProTool("diviops_fc_product_update", {
|
|
3231
|
-
description: "Update a simple FluentCart Pro product (Pro tier; requires FluentCart Pro installed + activated). V2 scope: simple onetime products only — accepts partial updates on title, status, content, excerpt, fulfillment_type, price, compare_price, sku. Refuses non-simple products (variation_type other than 'simple', or default variant with payment_type other than 'onetime') with `fluentcart.unsupported_product_shape` (HTTP 422) — multi-variation + subscription writes ship in V3+. Required: `id` (positive integer; the post ID of the fluent_products CPT entry). All other fields optional; only changed fields are applied. When no field actually changes, returns `ok:true` with `data.noop: true` (apply mode) or an empty-plan dry-run summary. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; apply-mode success payload is { product, detail, variation_ids, variations_count, changed_fields[] } (or { noop: true, product, detail, ... } on a no-op). Error codes: invalid_input (400) when any field violates the constraints; not_found (404) when the product ID does not exist; fluentcart.unsupported_product_shape (422) when the product is not simple/onetime; fluentcart.sku_conflict (409) when a new SKU collides with another variation; fluentcart.module_inactive (412); fluentcart.command_failed (500). Idempotency: conditional — repeating an identical update is a no-op." +
|
|
3231
|
+
description: "Update a simple FluentCart Pro product (Pro tier; requires FluentCart Pro installed + activated). V2 scope: simple onetime products only — accepts partial updates on title, status, content, excerpt, fulfillment_type, price, compare_price, sku. Refuses non-simple products (variation_type other than 'simple', or default variant with payment_type other than 'onetime') with `fluentcart.unsupported_product_shape` (HTTP 422) — multi-variation + subscription writes ship in V3+. Required: `id` (positive integer; the post ID of the fluent_products CPT entry). All other fields optional; only changed fields are applied. When no field actually changes, returns `ok:true` with `data.noop: true` (apply mode) or an empty-plan dry-run summary. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; apply-mode success payload is { product, detail, default_variation: { id, sku, item_price, compare_price } | null, variation_ids, variations_count, changed_fields[] } (or { noop: true, product, detail, default_variation, ... } on a no-op). The default_variation block reflects the post-update state (or current state on noop) and mirrors the diviops_fc_product_get shape — sku, item_price, and compare_price round-trip without a follow-up read. Unit asymmetry: write inputs (price, compare_price) are in currency units (e.g. 29.99); default_variation returns item_price + compare_price in stored cents (e.g. 2999). default_variation.sku is null after `sku: \"\"` clears it (the empty string is stored as SQL NULL so the variations table's UNIQUE constraint allows multiple cleared SKUs); default_variation.compare_price is null when no compare price is stored (FCP persists \"no compare\" as 0, normalized to null on read). Error codes: invalid_input (400) when any field violates the constraints; not_found (404) when the product ID does not exist; fluentcart.unsupported_product_shape (422) when the product is not simple/onetime; fluentcart.sku_conflict (409) when a new SKU collides with another variation; fluentcart.module_inactive (412); fluentcart.command_failed (500). Idempotency: conditional — repeating an identical update is a no-op." +
|
|
3232
3232
|
DRY_RUN_DESC_SUFFIX,
|
|
3233
3233
|
inputSchema: {
|
|
3234
3234
|
id: z
|