@productmaker/mcp 1.10.0 → 1.11.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.
- package/dist/http.js +28 -4
- package/dist/stdio.js +28 -4
- package/package.json +1 -1
package/dist/http.js
CHANGED
|
@@ -113,7 +113,7 @@ var ApiClient = class {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
// src/index.ts
|
|
116
|
-
var MCP_VERSION = "1.
|
|
116
|
+
var MCP_VERSION = "1.11.0";
|
|
117
117
|
|
|
118
118
|
// src/tools/tasks.ts
|
|
119
119
|
import { z as z2 } from "zod";
|
|
@@ -1735,7 +1735,18 @@ var ShopifyInput = z6.object({
|
|
|
1735
1735
|
/** ASK THE USER before setting: "¿Tu producto tiene variantes (talla, color, etc.)?".
|
|
1736
1736
|
* When true, the landing renders variant-picker pills; when false, it ships
|
|
1737
1737
|
* a single-option product page. Defaults to false. */
|
|
1738
|
-
showVariantPicker: z6.boolean().optional()
|
|
1738
|
+
showVariantPicker: z6.boolean().optional(),
|
|
1739
|
+
/** Default `auto` updates the product previously published for this task and
|
|
1740
|
+
* shop. Use `existing` with targetProductId to choose another product, or
|
|
1741
|
+
* `new` only when the user explicitly wants a duplicate/new listing. */
|
|
1742
|
+
publicationMode: z6.enum([
|
|
1743
|
+
"auto",
|
|
1744
|
+
"existing",
|
|
1745
|
+
"new"
|
|
1746
|
+
]).optional(),
|
|
1747
|
+
/** Shopify product GID, numeric id, or admin product URL. Required when
|
|
1748
|
+
* publicationMode is `existing`. */
|
|
1749
|
+
targetProductId: z6.string().trim().min(1).max(300).optional()
|
|
1739
1750
|
});
|
|
1740
1751
|
var McpCampaignConfig = z6.object({
|
|
1741
1752
|
dailyBudgetUsd: z6.number().positive().optional(),
|
|
@@ -1773,8 +1784,19 @@ var TikTokInput = z6.object({
|
|
|
1773
1784
|
primaryText: z6.string().trim().min(1).max(500).optional()
|
|
1774
1785
|
});
|
|
1775
1786
|
function registerPublishTools(server, api) {
|
|
1776
|
-
server.tool("publish_to_shopify", "Publica la landing
|
|
1787
|
+
server.tool("publish_to_shopify", "Publica o actualiza la landing en una tienda Shopify conectada. Precondici\xF3n: la tarea debe estar en status='complete' \u2014 usa `get_task_status` antes. Por defecto `publicationMode=auto`: si esta tarea ya fue publicada en esa tienda, actualiza ESE MISMO producto y conserva URL, precio, variantes, inventario y SKU; si no, crea uno. Usa `existing` + `targetProductId` cuando el usuario elija otro producto y `new` s\xF3lo si pide crear uno nuevo. ANTES de llamar preg\xFAntale \"\xBFTu producto tiene variantes (talla, color, etc.)?\" y pasa `showVariantPicker: true` si responde que s\xED. Por defecto publica TODAS las im\xE1genes generadas; pasa `numLandingImages` s\xF3lo si el usuario pide menos. La respuesta es markdown con el link a la landing y al producto.", ShopifyInput.shape, async (input) => {
|
|
1777
1788
|
try {
|
|
1789
|
+
if (input.publicationMode === "existing" && !input.targetProductId) {
|
|
1790
|
+
return {
|
|
1791
|
+
isError: true,
|
|
1792
|
+
content: [
|
|
1793
|
+
{
|
|
1794
|
+
type: "text",
|
|
1795
|
+
text: "targetProductId is required when publicationMode is existing"
|
|
1796
|
+
}
|
|
1797
|
+
]
|
|
1798
|
+
};
|
|
1799
|
+
}
|
|
1778
1800
|
const variantIndex = input.variantIndex ?? 0;
|
|
1779
1801
|
const availableImages = await fetchLandingImageCount(api, input.taskId);
|
|
1780
1802
|
const effectiveAvailable = availableImages > 0 ? availableImages : 3;
|
|
@@ -1788,7 +1810,9 @@ function registerPublishTools(server, api) {
|
|
|
1788
1810
|
const r = await api.postJson(`/v1/tasks/${encodeURIComponent(input.taskId)}/publish/shopify`, {
|
|
1789
1811
|
shopDomain: input.shopDomain,
|
|
1790
1812
|
selectedLandingImages,
|
|
1791
|
-
showVariantPicker: input.showVariantPicker
|
|
1813
|
+
showVariantPicker: input.showVariantPicker,
|
|
1814
|
+
publicationMode: input.publicationMode,
|
|
1815
|
+
targetProductId: input.targetProductId
|
|
1792
1816
|
});
|
|
1793
1817
|
return renderShopifyPublishMarkdown(r);
|
|
1794
1818
|
} catch (e) {
|
package/dist/stdio.js
CHANGED
|
@@ -110,7 +110,7 @@ var ApiClient = class {
|
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
// src/index.ts
|
|
113
|
-
var MCP_VERSION = "1.
|
|
113
|
+
var MCP_VERSION = "1.11.0";
|
|
114
114
|
|
|
115
115
|
// src/tools/tasks.ts
|
|
116
116
|
import { z as z2 } from "zod";
|
|
@@ -1691,7 +1691,18 @@ var ShopifyInput = z6.object({
|
|
|
1691
1691
|
/** ASK THE USER before setting: "¿Tu producto tiene variantes (talla, color, etc.)?".
|
|
1692
1692
|
* When true, the landing renders variant-picker pills; when false, it ships
|
|
1693
1693
|
* a single-option product page. Defaults to false. */
|
|
1694
|
-
showVariantPicker: z6.boolean().optional()
|
|
1694
|
+
showVariantPicker: z6.boolean().optional(),
|
|
1695
|
+
/** Default `auto` updates the product previously published for this task and
|
|
1696
|
+
* shop. Use `existing` with targetProductId to choose another product, or
|
|
1697
|
+
* `new` only when the user explicitly wants a duplicate/new listing. */
|
|
1698
|
+
publicationMode: z6.enum([
|
|
1699
|
+
"auto",
|
|
1700
|
+
"existing",
|
|
1701
|
+
"new"
|
|
1702
|
+
]).optional(),
|
|
1703
|
+
/** Shopify product GID, numeric id, or admin product URL. Required when
|
|
1704
|
+
* publicationMode is `existing`. */
|
|
1705
|
+
targetProductId: z6.string().trim().min(1).max(300).optional()
|
|
1695
1706
|
});
|
|
1696
1707
|
var McpCampaignConfig = z6.object({
|
|
1697
1708
|
dailyBudgetUsd: z6.number().positive().optional(),
|
|
@@ -1729,8 +1740,19 @@ var TikTokInput = z6.object({
|
|
|
1729
1740
|
primaryText: z6.string().trim().min(1).max(500).optional()
|
|
1730
1741
|
});
|
|
1731
1742
|
function registerPublishTools(server, api) {
|
|
1732
|
-
server.tool("publish_to_shopify", "Publica la landing
|
|
1743
|
+
server.tool("publish_to_shopify", "Publica o actualiza la landing en una tienda Shopify conectada. Precondici\xF3n: la tarea debe estar en status='complete' \u2014 usa `get_task_status` antes. Por defecto `publicationMode=auto`: si esta tarea ya fue publicada en esa tienda, actualiza ESE MISMO producto y conserva URL, precio, variantes, inventario y SKU; si no, crea uno. Usa `existing` + `targetProductId` cuando el usuario elija otro producto y `new` s\xF3lo si pide crear uno nuevo. ANTES de llamar preg\xFAntale \"\xBFTu producto tiene variantes (talla, color, etc.)?\" y pasa `showVariantPicker: true` si responde que s\xED. Por defecto publica TODAS las im\xE1genes generadas; pasa `numLandingImages` s\xF3lo si el usuario pide menos. La respuesta es markdown con el link a la landing y al producto.", ShopifyInput.shape, async (input) => {
|
|
1733
1744
|
try {
|
|
1745
|
+
if (input.publicationMode === "existing" && !input.targetProductId) {
|
|
1746
|
+
return {
|
|
1747
|
+
isError: true,
|
|
1748
|
+
content: [
|
|
1749
|
+
{
|
|
1750
|
+
type: "text",
|
|
1751
|
+
text: "targetProductId is required when publicationMode is existing"
|
|
1752
|
+
}
|
|
1753
|
+
]
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1734
1756
|
const variantIndex = input.variantIndex ?? 0;
|
|
1735
1757
|
const availableImages = await fetchLandingImageCount(api, input.taskId);
|
|
1736
1758
|
const effectiveAvailable = availableImages > 0 ? availableImages : 3;
|
|
@@ -1744,7 +1766,9 @@ function registerPublishTools(server, api) {
|
|
|
1744
1766
|
const r = await api.postJson(`/v1/tasks/${encodeURIComponent(input.taskId)}/publish/shopify`, {
|
|
1745
1767
|
shopDomain: input.shopDomain,
|
|
1746
1768
|
selectedLandingImages,
|
|
1747
|
-
showVariantPicker: input.showVariantPicker
|
|
1769
|
+
showVariantPicker: input.showVariantPicker,
|
|
1770
|
+
publicationMode: input.publicationMode,
|
|
1771
|
+
targetProductId: input.targetProductId
|
|
1748
1772
|
});
|
|
1749
1773
|
return renderShopifyPublishMarkdown(r);
|
|
1750
1774
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@productmaker/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Product Maker MCP server — connect Claude Desktop, Claude Code, ChatGPT, or Gemini to Product Maker AI to generate dropshipping landing pages, UGC videos, and ad creatives, and publish to Shopify and Meta Ads from your AI assistant.",
|