@wix/mcp 1.0.90 → 1.0.91
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/build/bin-standalone.js +27 -24
- package/build/cjs/index.cjs +29 -26
- package/build/cjs/toolkit.cjs +27 -24
- package/build/dts/config/default-config.js +5 -5
- package/build/dts/docs/docs.d.ts +2 -2
- package/build/dts/docs/docs.js +4 -4
- package/build/dts/docs/start-deploy-website.d.ts +14 -0
- package/build/dts/docs/start-deploy-website.js +51 -0
- package/build/dts/import-claude-design-tool/index.js +2 -2
- package/build/dts/toolkit-entry.d.cts +2 -2
- package/build/dts/toolkit-entry.d.ts +2 -2
- package/build/esm/index.js +29 -26
- package/build/esm/toolkit.js +27 -24
- package/package.json +2 -2
- package/build/dts/docs/deploy-website.d.ts +0 -13
- package/build/dts/docs/deploy-website.js +0 -45
package/build/bin-standalone.js
CHANGED
|
@@ -71599,7 +71599,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
|
|
|
71599
71599
|
"if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.",
|
|
71600
71600
|
"**Exception \u2014 creating a new Wix site/website:** For a normal creation request \u2014 and only then \u2014 skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.",
|
|
71601
71601
|
"If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away \u2014 these don't need the site's purpose first.",
|
|
71602
|
-
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call
|
|
71602
|
+
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call StartDeployWebsite right away \u2014 not a site-creation tool, not the docs.",
|
|
71603
71603
|
"Never default to AI or search templates unless the user explicitly requests it. When the user named no creation method - let the user make that choice as the site-creation tools' descriptions direct. Never route normal site creation through ManageWixSite, CallWixSiteAPI, or ExecuteWixAPI."
|
|
71604
71604
|
);
|
|
71605
71605
|
}
|
|
@@ -71681,7 +71681,7 @@ var SITE_CREATION_COPY = {
|
|
|
71681
71681
|
var SITE_GUIDANCE = dedent_default`
|
|
71682
71682
|
A new-site request has two things to settle: what the site is for, and how to build it. The how is AI generation vs. starting from a template, so naming templates, a template id or Wix Studio (Wix Studio is also the template side) already settles it.
|
|
71683
71683
|
|
|
71684
|
-
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call
|
|
71684
|
+
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call StartDeployWebsite, which returns the recipe to publish the files yourself (the drop page is only its fallback).
|
|
71685
71685
|
|
|
71686
71686
|
Settle what the site is for first: its purpose, topic, business type, audience, or main visitor action. Naming a method is not a description of the site, and neither is the business or industry on its own.
|
|
71687
71687
|
If you can't tell yet, ask the preferred question below and nothing else — one question, no creation-method question in the same reply, and no internal tool names.
|
|
@@ -72073,7 +72073,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
72073
72073
|
`,
|
|
72074
72074
|
"import-claude-design-from-url": dedent_default`
|
|
72075
72075
|
Import a design created in Claude's design tool into Wix. Takes the signed claudeusercontent.com URL Claude Design produces for its self-contained HTML bundle (all images, fonts, and styles inlined); any other host is rejected. Creates a live Wix-hosted site and returns its URL.
|
|
72076
|
-
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call
|
|
72076
|
+
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call StartDeployWebsite instead; it returns the recipe to publish the files yourself.
|
|
72077
72077
|
`,
|
|
72078
72078
|
RunWixCliCommand: dedent_default`
|
|
72079
72079
|
Executes Wix CLI commands for Wix app development and management.
|
|
@@ -72555,7 +72555,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
72555
72555
|
Results: each root field fails independently — \`errors[].path\` names the failing field and \`errors[].extensions.message\` the cause (e.g. PERMISSION_DENIED); \`data\` still holds the fields that succeeded. Mutations return the created/updated entity — read the IDs from it and do not re-query to verify. Large results are truncated: narrow the selection or page size instead of re-running.
|
|
72556
72556
|
Set \`hasMutations: true\` for any document containing a mutation root field.
|
|
72557
72557
|
`,
|
|
72558
|
-
|
|
72558
|
+
StartDeployWebsite: dedent_default`
|
|
72559
72559
|
The user — or you, earlier in this conversation — ALREADY HAVE a finished page or site, in any form, and it should be live on Wix: HTML/CSS/JS files, a static build (dist/, out/), a zip, another AI builder's export, or a page/design you created in this conversation (export it to HTML first — a finished design IS a finished page). Call this when the user says deploy, host, publish, put online, make it live, get a URL, or upload my site / index.html.
|
|
72560
72560
|
Also for updating a site deployed this way (replace its files; same site, same URL) and for implementing a backend on one (stores, bookings, CMS, members) as a Wix Headless project — same site, same URL. Works with or without a Wix login (anonymous deploy with a save link), through the Wix MCP alone or from a shell.
|
|
72561
72561
|
Missing real functionality — a fake checkout, a form that goes nowhere, bookings — is NOT a reason to rebuild the site with a site-creation tool: deploy the page as is, then add the backend afterwards (the recipe covers it).
|
|
@@ -72565,7 +72565,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
72565
72565
|
CreateWixBusinessGuide: dedent_default`
|
|
72566
72566
|
Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
|
|
72567
72567
|
Call this ONLY when the user explicitly asks for a headless site, a Wix Classic Editor site, or manual/advanced account/API-based site creation — these don't need the site's purpose first. For normal site-creation ${SITE_CREATION_COPY.normalCreationRoute.nonWidget}; for a specific template id, call \`CreateSiteFromTemplate\`.
|
|
72568
|
-
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call
|
|
72568
|
+
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
|
|
72569
72569
|
|
|
72570
72570
|
## What This Tool Contains
|
|
72571
72571
|
|
|
@@ -73674,39 +73674,42 @@ ${articleContent}${nextSteps}`;
|
|
|
73674
73674
|
);
|
|
73675
73675
|
}
|
|
73676
73676
|
|
|
73677
|
-
// src/docs/deploy-website.ts
|
|
73678
|
-
var
|
|
73679
|
-
var
|
|
73677
|
+
// src/docs/start-deploy-website.ts
|
|
73678
|
+
var START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION = "A few sentences covering: the user's request (quoted if short); what the site is \u2014 its purpose and who it is for \u2014 and its current form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation), roughly how many files, and whether it includes images; what the site must be able to do for its visitors beyond showing pages, if anything \u2014 selling, bookings or reservations, tickets, menus and orders, rentals, forms, memberships or paid plans, donations, a blog, or anything else the user expects to work \u2014 described in your own words, or a note that it is a plain static site with no such needs; which agent or product you are and the harness you run in.";
|
|
73679
|
+
var START_DEPLOY_WEBSITE_TOOL_NAME = "StartDeployWebsite";
|
|
73680
|
+
var START_DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
73680
73681
|
var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
73681
73682
|
var FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} \u2014 give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
73682
|
-
function
|
|
73683
|
+
function startDeployWebsiteResponse(recipe) {
|
|
73683
73684
|
return [
|
|
73684
|
-
`The following is the content of ${
|
|
73685
|
+
`The following is the content of ${START_DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself \u2014 do not hand the user instructions.`,
|
|
73685
73686
|
FALLBACK_LINE,
|
|
73686
73687
|
"---",
|
|
73687
73688
|
recipe.trim()
|
|
73688
73689
|
].join("\n\n");
|
|
73689
73690
|
}
|
|
73690
|
-
var
|
|
73691
|
-
`Read and follow this recipe end to end: ${
|
|
73691
|
+
var START_DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
73692
|
+
`Read and follow this recipe end to end: ${START_DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
73692
73693
|
"It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself \u2014 do not hand the user instructions.",
|
|
73693
73694
|
FALLBACK_LINE
|
|
73694
73695
|
].join("\n\n");
|
|
73695
|
-
function
|
|
73696
|
-
if (disableTools.includes(
|
|
73696
|
+
function addStartDeployWebsiteTool(server2, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
73697
|
+
if (disableTools.includes(START_DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
73697
73698
|
return;
|
|
73698
73699
|
}
|
|
73699
73700
|
server2.tool(
|
|
73700
|
-
|
|
73701
|
-
toolDescriptions?.[
|
|
73702
|
-
{
|
|
73701
|
+
START_DEPLOY_WEBSITE_TOOL_NAME,
|
|
73702
|
+
toolDescriptions?.[START_DEPLOY_WEBSITE_TOOL_NAME] ?? defaultToolDescriptions[START_DEPLOY_WEBSITE_TOOL_NAME],
|
|
73703
|
+
{
|
|
73704
|
+
brief: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION)
|
|
73705
|
+
},
|
|
73703
73706
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
73704
73707
|
async (_args, { httpClient }) => {
|
|
73705
|
-
let text =
|
|
73708
|
+
let text = START_DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
73706
73709
|
try {
|
|
73707
73710
|
const recipe = await fetchArticleContent(
|
|
73708
73711
|
httpClient,
|
|
73709
|
-
|
|
73712
|
+
START_DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ""),
|
|
73710
73713
|
"article",
|
|
73711
73714
|
true,
|
|
73712
73715
|
fetchOptions.skillsPortalUrl,
|
|
@@ -73714,11 +73717,11 @@ function addDeployWebsiteTool(server2, disableTools = [], toolDescriptions, fetc
|
|
|
73714
73717
|
fetchOptions.commitHash
|
|
73715
73718
|
);
|
|
73716
73719
|
if (recipe && recipe.trim()) {
|
|
73717
|
-
text =
|
|
73720
|
+
text = startDeployWebsiteResponse(recipe);
|
|
73718
73721
|
}
|
|
73719
73722
|
} catch (error2) {
|
|
73720
73723
|
console.warn(
|
|
73721
|
-
`[
|
|
73724
|
+
`[StartDeployWebsite] recipe fetch failed, returning the pointer:`,
|
|
73722
73725
|
error2 instanceof Error ? error2.message : error2
|
|
73723
73726
|
);
|
|
73724
73727
|
}
|
|
@@ -73786,7 +73789,7 @@ var addDocsTools = (server2, allowedTools = [
|
|
|
73786
73789
|
const {
|
|
73787
73790
|
getToKnowWixEnabled = false,
|
|
73788
73791
|
createWixBusinessGuideEnabled = true,
|
|
73789
|
-
|
|
73792
|
+
startDeployWebsiteEnabled = true,
|
|
73790
73793
|
disableTools,
|
|
73791
73794
|
toolDescriptions,
|
|
73792
73795
|
readmeDocs,
|
|
@@ -73852,8 +73855,8 @@ var addDocsTools = (server2, allowedTools = [
|
|
|
73852
73855
|
cliEnabled
|
|
73853
73856
|
);
|
|
73854
73857
|
}
|
|
73855
|
-
if (
|
|
73856
|
-
|
|
73858
|
+
if (startDeployWebsiteEnabled) {
|
|
73859
|
+
addStartDeployWebsiteTool(server2, disableTools || [], toolDescriptions, {
|
|
73857
73860
|
skillsPortalUrl,
|
|
73858
73861
|
repo: effectiveRepo,
|
|
73859
73862
|
commitHash: effectiveCommitHash
|
package/build/cjs/index.cjs
CHANGED
|
@@ -37215,7 +37215,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
|
|
|
37215
37215
|
"if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.",
|
|
37216
37216
|
"**Exception \u2014 creating a new Wix site/website:** For a normal creation request \u2014 and only then \u2014 skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.",
|
|
37217
37217
|
"If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away \u2014 these don't need the site's purpose first.",
|
|
37218
|
-
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call
|
|
37218
|
+
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call StartDeployWebsite right away \u2014 not a site-creation tool, not the docs.",
|
|
37219
37219
|
"Never default to AI or search templates unless the user explicitly requests it. When the user named no creation method - let the user make that choice as the site-creation tools' descriptions direct. Never route normal site creation through ManageWixSite, CallWixSiteAPI, or ExecuteWixAPI."
|
|
37220
37220
|
);
|
|
37221
37221
|
}
|
|
@@ -37297,7 +37297,7 @@ var SITE_CREATION_COPY = {
|
|
|
37297
37297
|
var SITE_GUIDANCE = dedent_default`
|
|
37298
37298
|
A new-site request has two things to settle: what the site is for, and how to build it. The how is AI generation vs. starting from a template, so naming templates, a template id or Wix Studio (Wix Studio is also the template side) already settles it.
|
|
37299
37299
|
|
|
37300
|
-
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call
|
|
37300
|
+
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call StartDeployWebsite, which returns the recipe to publish the files yourself (the drop page is only its fallback).
|
|
37301
37301
|
|
|
37302
37302
|
Settle what the site is for first: its purpose, topic, business type, audience, or main visitor action. Naming a method is not a description of the site, and neither is the business or industry on its own.
|
|
37303
37303
|
If you can't tell yet, ask the preferred question below and nothing else — one question, no creation-method question in the same reply, and no internal tool names.
|
|
@@ -37689,7 +37689,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37689
37689
|
`,
|
|
37690
37690
|
"import-claude-design-from-url": dedent_default`
|
|
37691
37691
|
Import a design created in Claude's design tool into Wix. Takes the signed claudeusercontent.com URL Claude Design produces for its self-contained HTML bundle (all images, fonts, and styles inlined); any other host is rejected. Creates a live Wix-hosted site and returns its URL.
|
|
37692
|
-
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call
|
|
37692
|
+
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call StartDeployWebsite instead; it returns the recipe to publish the files yourself.
|
|
37693
37693
|
`,
|
|
37694
37694
|
RunWixCliCommand: dedent_default`
|
|
37695
37695
|
Executes Wix CLI commands for Wix app development and management.
|
|
@@ -38171,7 +38171,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
38171
38171
|
Results: each root field fails independently — \`errors[].path\` names the failing field and \`errors[].extensions.message\` the cause (e.g. PERMISSION_DENIED); \`data\` still holds the fields that succeeded. Mutations return the created/updated entity — read the IDs from it and do not re-query to verify. Large results are truncated: narrow the selection or page size instead of re-running.
|
|
38172
38172
|
Set \`hasMutations: true\` for any document containing a mutation root field.
|
|
38173
38173
|
`,
|
|
38174
|
-
|
|
38174
|
+
StartDeployWebsite: dedent_default`
|
|
38175
38175
|
The user — or you, earlier in this conversation — ALREADY HAVE a finished page or site, in any form, and it should be live on Wix: HTML/CSS/JS files, a static build (dist/, out/), a zip, another AI builder's export, or a page/design you created in this conversation (export it to HTML first — a finished design IS a finished page). Call this when the user says deploy, host, publish, put online, make it live, get a URL, or upload my site / index.html.
|
|
38176
38176
|
Also for updating a site deployed this way (replace its files; same site, same URL) and for implementing a backend on one (stores, bookings, CMS, members) as a Wix Headless project — same site, same URL. Works with or without a Wix login (anonymous deploy with a save link), through the Wix MCP alone or from a shell.
|
|
38177
38177
|
Missing real functionality — a fake checkout, a form that goes nowhere, bookings — is NOT a reason to rebuild the site with a site-creation tool: deploy the page as is, then add the backend afterwards (the recipe covers it).
|
|
@@ -38181,7 +38181,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
38181
38181
|
CreateWixBusinessGuide: dedent_default`
|
|
38182
38182
|
Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
|
|
38183
38183
|
Call this ONLY when the user explicitly asks for a headless site, a Wix Classic Editor site, or manual/advanced account/API-based site creation — these don't need the site's purpose first. For normal site-creation ${SITE_CREATION_COPY.normalCreationRoute.nonWidget}; for a specific template id, call \`CreateSiteFromTemplate\`.
|
|
38184
|
-
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call
|
|
38184
|
+
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
|
|
38185
38185
|
|
|
38186
38186
|
## What This Tool Contains
|
|
38187
38187
|
|
|
@@ -39328,39 +39328,42 @@ ${articleContent}${nextSteps}`;
|
|
|
39328
39328
|
);
|
|
39329
39329
|
}
|
|
39330
39330
|
|
|
39331
|
-
// src/docs/deploy-website.ts
|
|
39332
|
-
var
|
|
39333
|
-
var
|
|
39331
|
+
// src/docs/start-deploy-website.ts
|
|
39332
|
+
var START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION = "A few sentences covering: the user's request (quoted if short); what the site is \u2014 its purpose and who it is for \u2014 and its current form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation), roughly how many files, and whether it includes images; what the site must be able to do for its visitors beyond showing pages, if anything \u2014 selling, bookings or reservations, tickets, menus and orders, rentals, forms, memberships or paid plans, donations, a blog, or anything else the user expects to work \u2014 described in your own words, or a note that it is a plain static site with no such needs; which agent or product you are and the harness you run in.";
|
|
39333
|
+
var START_DEPLOY_WEBSITE_TOOL_NAME = "StartDeployWebsite";
|
|
39334
|
+
var START_DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
39334
39335
|
var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
39335
39336
|
var FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} \u2014 give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
39336
|
-
function
|
|
39337
|
+
function startDeployWebsiteResponse(recipe) {
|
|
39337
39338
|
return [
|
|
39338
|
-
`The following is the content of ${
|
|
39339
|
+
`The following is the content of ${START_DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself \u2014 do not hand the user instructions.`,
|
|
39339
39340
|
FALLBACK_LINE,
|
|
39340
39341
|
"---",
|
|
39341
39342
|
recipe.trim()
|
|
39342
39343
|
].join("\n\n");
|
|
39343
39344
|
}
|
|
39344
|
-
var
|
|
39345
|
-
`Read and follow this recipe end to end: ${
|
|
39345
|
+
var START_DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
39346
|
+
`Read and follow this recipe end to end: ${START_DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
39346
39347
|
"It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself \u2014 do not hand the user instructions.",
|
|
39347
39348
|
FALLBACK_LINE
|
|
39348
39349
|
].join("\n\n");
|
|
39349
|
-
function
|
|
39350
|
-
if (disableTools.includes(
|
|
39350
|
+
function addStartDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
39351
|
+
if (disableTools.includes(START_DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
39351
39352
|
return;
|
|
39352
39353
|
}
|
|
39353
39354
|
server.tool(
|
|
39354
|
-
|
|
39355
|
-
toolDescriptions?.[
|
|
39356
|
-
{
|
|
39355
|
+
START_DEPLOY_WEBSITE_TOOL_NAME,
|
|
39356
|
+
toolDescriptions?.[START_DEPLOY_WEBSITE_TOOL_NAME] ?? defaultToolDescriptions[START_DEPLOY_WEBSITE_TOOL_NAME],
|
|
39357
|
+
{
|
|
39358
|
+
brief: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION)
|
|
39359
|
+
},
|
|
39357
39360
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
39358
39361
|
async (_args, { httpClient: httpClient6 }) => {
|
|
39359
|
-
let text =
|
|
39362
|
+
let text = START_DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
39360
39363
|
try {
|
|
39361
39364
|
const recipe = await fetchArticleContent(
|
|
39362
39365
|
httpClient6,
|
|
39363
|
-
|
|
39366
|
+
START_DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ""),
|
|
39364
39367
|
"article",
|
|
39365
39368
|
true,
|
|
39366
39369
|
fetchOptions.skillsPortalUrl,
|
|
@@ -39368,11 +39371,11 @@ function addDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetch
|
|
|
39368
39371
|
fetchOptions.commitHash
|
|
39369
39372
|
);
|
|
39370
39373
|
if (recipe && recipe.trim()) {
|
|
39371
|
-
text =
|
|
39374
|
+
text = startDeployWebsiteResponse(recipe);
|
|
39372
39375
|
}
|
|
39373
39376
|
} catch (error2) {
|
|
39374
39377
|
console.warn(
|
|
39375
|
-
`[
|
|
39378
|
+
`[StartDeployWebsite] recipe fetch failed, returning the pointer:`,
|
|
39376
39379
|
error2 instanceof Error ? error2.message : error2
|
|
39377
39380
|
);
|
|
39378
39381
|
}
|
|
@@ -39440,7 +39443,7 @@ var addDocsTools = (server, allowedTools = [
|
|
|
39440
39443
|
const {
|
|
39441
39444
|
getToKnowWixEnabled = false,
|
|
39442
39445
|
createWixBusinessGuideEnabled = true,
|
|
39443
|
-
|
|
39446
|
+
startDeployWebsiteEnabled = true,
|
|
39444
39447
|
disableTools,
|
|
39445
39448
|
toolDescriptions,
|
|
39446
39449
|
readmeDocs,
|
|
@@ -39506,8 +39509,8 @@ var addDocsTools = (server, allowedTools = [
|
|
|
39506
39509
|
cliEnabled
|
|
39507
39510
|
);
|
|
39508
39511
|
}
|
|
39509
|
-
if (
|
|
39510
|
-
|
|
39512
|
+
if (startDeployWebsiteEnabled) {
|
|
39513
|
+
addStartDeployWebsiteTool(server, disableTools || [], toolDescriptions, {
|
|
39511
39514
|
skillsPortalUrl,
|
|
39512
39515
|
repo: effectiveRepo,
|
|
39513
39516
|
commitHash: effectiveCommitHash
|
|
@@ -52235,12 +52238,12 @@ function addImportClaudeDesignTool(server, authStrategy, options) {
|
|
|
52235
52238
|
designUrl = new URL(args.url);
|
|
52236
52239
|
} catch {
|
|
52237
52240
|
return errorResult(
|
|
52238
|
-
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call
|
|
52241
|
+
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call StartDeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp."
|
|
52239
52242
|
);
|
|
52240
52243
|
}
|
|
52241
52244
|
if (designUrl.protocol !== "https:" || !designUrl.hostname.endsWith(CLAUDE_USER_CONTENT_HOST_SUFFIX)) {
|
|
52242
52245
|
return errorResult(
|
|
52243
|
-
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call
|
|
52246
|
+
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call StartDeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp."
|
|
52244
52247
|
);
|
|
52245
52248
|
}
|
|
52246
52249
|
const accountHeaders = await authStrategy.getAccountAuthHeaders();
|
package/build/cjs/toolkit.cjs
CHANGED
|
@@ -17702,7 +17702,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
|
|
|
17702
17702
|
"if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.",
|
|
17703
17703
|
"**Exception \u2014 creating a new Wix site/website:** For a normal creation request \u2014 and only then \u2014 skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.",
|
|
17704
17704
|
"If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away \u2014 these don't need the site's purpose first.",
|
|
17705
|
-
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call
|
|
17705
|
+
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call StartDeployWebsite right away \u2014 not a site-creation tool, not the docs.",
|
|
17706
17706
|
"Never default to AI or search templates unless the user explicitly requests it. When the user named no creation method - let the user make that choice as the site-creation tools' descriptions direct. Never route normal site creation through ManageWixSite, CallWixSiteAPI, or ExecuteWixAPI."
|
|
17707
17707
|
);
|
|
17708
17708
|
}
|
|
@@ -17784,7 +17784,7 @@ var SITE_CREATION_COPY = {
|
|
|
17784
17784
|
var SITE_GUIDANCE = dedent_default`
|
|
17785
17785
|
A new-site request has two things to settle: what the site is for, and how to build it. The how is AI generation vs. starting from a template, so naming templates, a template id or Wix Studio (Wix Studio is also the template side) already settles it.
|
|
17786
17786
|
|
|
17787
|
-
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call
|
|
17787
|
+
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call StartDeployWebsite, which returns the recipe to publish the files yourself (the drop page is only its fallback).
|
|
17788
17788
|
|
|
17789
17789
|
Settle what the site is for first: its purpose, topic, business type, audience, or main visitor action. Naming a method is not a description of the site, and neither is the business or industry on its own.
|
|
17790
17790
|
If you can't tell yet, ask the preferred question below and nothing else — one question, no creation-method question in the same reply, and no internal tool names.
|
|
@@ -18176,7 +18176,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
18176
18176
|
`,
|
|
18177
18177
|
"import-claude-design-from-url": dedent_default`
|
|
18178
18178
|
Import a design created in Claude's design tool into Wix. Takes the signed claudeusercontent.com URL Claude Design produces for its self-contained HTML bundle (all images, fonts, and styles inlined); any other host is rejected. Creates a live Wix-hosted site and returns its URL.
|
|
18179
|
-
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call
|
|
18179
|
+
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call StartDeployWebsite instead; it returns the recipe to publish the files yourself.
|
|
18180
18180
|
`,
|
|
18181
18181
|
RunWixCliCommand: dedent_default`
|
|
18182
18182
|
Executes Wix CLI commands for Wix app development and management.
|
|
@@ -18658,7 +18658,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
18658
18658
|
Results: each root field fails independently — \`errors[].path\` names the failing field and \`errors[].extensions.message\` the cause (e.g. PERMISSION_DENIED); \`data\` still holds the fields that succeeded. Mutations return the created/updated entity — read the IDs from it and do not re-query to verify. Large results are truncated: narrow the selection or page size instead of re-running.
|
|
18659
18659
|
Set \`hasMutations: true\` for any document containing a mutation root field.
|
|
18660
18660
|
`,
|
|
18661
|
-
|
|
18661
|
+
StartDeployWebsite: dedent_default`
|
|
18662
18662
|
The user — or you, earlier in this conversation — ALREADY HAVE a finished page or site, in any form, and it should be live on Wix: HTML/CSS/JS files, a static build (dist/, out/), a zip, another AI builder's export, or a page/design you created in this conversation (export it to HTML first — a finished design IS a finished page). Call this when the user says deploy, host, publish, put online, make it live, get a URL, or upload my site / index.html.
|
|
18663
18663
|
Also for updating a site deployed this way (replace its files; same site, same URL) and for implementing a backend on one (stores, bookings, CMS, members) as a Wix Headless project — same site, same URL. Works with or without a Wix login (anonymous deploy with a save link), through the Wix MCP alone or from a shell.
|
|
18664
18664
|
Missing real functionality — a fake checkout, a form that goes nowhere, bookings — is NOT a reason to rebuild the site with a site-creation tool: deploy the page as is, then add the backend afterwards (the recipe covers it).
|
|
@@ -18668,7 +18668,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
18668
18668
|
CreateWixBusinessGuide: dedent_default`
|
|
18669
18669
|
Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
|
|
18670
18670
|
Call this ONLY when the user explicitly asks for a headless site, a Wix Classic Editor site, or manual/advanced account/API-based site creation — these don't need the site's purpose first. For normal site-creation ${SITE_CREATION_COPY.normalCreationRoute.nonWidget}; for a specific template id, call \`CreateSiteFromTemplate\`.
|
|
18671
|
-
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call
|
|
18671
|
+
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
|
|
18672
18672
|
|
|
18673
18673
|
## What This Tool Contains
|
|
18674
18674
|
|
|
@@ -19815,39 +19815,42 @@ ${articleContent}${nextSteps}`;
|
|
|
19815
19815
|
);
|
|
19816
19816
|
}
|
|
19817
19817
|
|
|
19818
|
-
// src/docs/deploy-website.ts
|
|
19819
|
-
var
|
|
19820
|
-
var
|
|
19818
|
+
// src/docs/start-deploy-website.ts
|
|
19819
|
+
var START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION = "A few sentences covering: the user's request (quoted if short); what the site is \u2014 its purpose and who it is for \u2014 and its current form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation), roughly how many files, and whether it includes images; what the site must be able to do for its visitors beyond showing pages, if anything \u2014 selling, bookings or reservations, tickets, menus and orders, rentals, forms, memberships or paid plans, donations, a blog, or anything else the user expects to work \u2014 described in your own words, or a note that it is a plain static site with no such needs; which agent or product you are and the harness you run in.";
|
|
19820
|
+
var START_DEPLOY_WEBSITE_TOOL_NAME = "StartDeployWebsite";
|
|
19821
|
+
var START_DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
19821
19822
|
var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
19822
19823
|
var FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} \u2014 give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
19823
|
-
function
|
|
19824
|
+
function startDeployWebsiteResponse(recipe) {
|
|
19824
19825
|
return [
|
|
19825
|
-
`The following is the content of ${
|
|
19826
|
+
`The following is the content of ${START_DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself \u2014 do not hand the user instructions.`,
|
|
19826
19827
|
FALLBACK_LINE,
|
|
19827
19828
|
"---",
|
|
19828
19829
|
recipe.trim()
|
|
19829
19830
|
].join("\n\n");
|
|
19830
19831
|
}
|
|
19831
|
-
var
|
|
19832
|
-
`Read and follow this recipe end to end: ${
|
|
19832
|
+
var START_DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
19833
|
+
`Read and follow this recipe end to end: ${START_DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
19833
19834
|
"It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself \u2014 do not hand the user instructions.",
|
|
19834
19835
|
FALLBACK_LINE
|
|
19835
19836
|
].join("\n\n");
|
|
19836
|
-
function
|
|
19837
|
-
if (disableTools.includes(
|
|
19837
|
+
function addStartDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
19838
|
+
if (disableTools.includes(START_DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
19838
19839
|
return;
|
|
19839
19840
|
}
|
|
19840
19841
|
server.tool(
|
|
19841
|
-
|
|
19842
|
-
toolDescriptions?.[
|
|
19843
|
-
{
|
|
19842
|
+
START_DEPLOY_WEBSITE_TOOL_NAME,
|
|
19843
|
+
toolDescriptions?.[START_DEPLOY_WEBSITE_TOOL_NAME] ?? defaultToolDescriptions[START_DEPLOY_WEBSITE_TOOL_NAME],
|
|
19844
|
+
{
|
|
19845
|
+
brief: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION)
|
|
19846
|
+
},
|
|
19844
19847
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
19845
19848
|
async (_args, { httpClient }) => {
|
|
19846
|
-
let text =
|
|
19849
|
+
let text = START_DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
19847
19850
|
try {
|
|
19848
19851
|
const recipe = await fetchArticleContent(
|
|
19849
19852
|
httpClient,
|
|
19850
|
-
|
|
19853
|
+
START_DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ""),
|
|
19851
19854
|
"article",
|
|
19852
19855
|
true,
|
|
19853
19856
|
fetchOptions.skillsPortalUrl,
|
|
@@ -19855,11 +19858,11 @@ function addDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetch
|
|
|
19855
19858
|
fetchOptions.commitHash
|
|
19856
19859
|
);
|
|
19857
19860
|
if (recipe && recipe.trim()) {
|
|
19858
|
-
text =
|
|
19861
|
+
text = startDeployWebsiteResponse(recipe);
|
|
19859
19862
|
}
|
|
19860
19863
|
} catch (error) {
|
|
19861
19864
|
console.warn(
|
|
19862
|
-
`[
|
|
19865
|
+
`[StartDeployWebsite] recipe fetch failed, returning the pointer:`,
|
|
19863
19866
|
error instanceof Error ? error.message : error
|
|
19864
19867
|
);
|
|
19865
19868
|
}
|
|
@@ -19916,7 +19919,7 @@ var addDocsTools = (server, allowedTools = [
|
|
|
19916
19919
|
const {
|
|
19917
19920
|
getToKnowWixEnabled = false,
|
|
19918
19921
|
createWixBusinessGuideEnabled = true,
|
|
19919
|
-
|
|
19922
|
+
startDeployWebsiteEnabled = true,
|
|
19920
19923
|
disableTools,
|
|
19921
19924
|
toolDescriptions,
|
|
19922
19925
|
readmeDocs,
|
|
@@ -19982,8 +19985,8 @@ var addDocsTools = (server, allowedTools = [
|
|
|
19982
19985
|
cliEnabled
|
|
19983
19986
|
);
|
|
19984
19987
|
}
|
|
19985
|
-
if (
|
|
19986
|
-
|
|
19988
|
+
if (startDeployWebsiteEnabled) {
|
|
19989
|
+
addStartDeployWebsiteTool(server, disableTools || [], toolDescriptions, {
|
|
19987
19990
|
skillsPortalUrl,
|
|
19988
19991
|
repo: effectiveRepo,
|
|
19989
19992
|
commitHash: effectiveCommitHash
|
|
@@ -18,7 +18,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
|
|
|
18
18
|
const exception = includeReadme ? '**Exception:** ' : '';
|
|
19
19
|
const lines = [];
|
|
20
20
|
if (includeReadme) {
|
|
21
|
-
lines.push('if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.', '**Exception — creating a new Wix site/website:** For a normal creation request — and only then — skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.', "If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away — these don't need the site's purpose first.", "If the user — or you, earlier in this conversation — already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call
|
|
21
|
+
lines.push('if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.', '**Exception — creating a new Wix site/website:** For a normal creation request — and only then — skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.', "If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away — these don't need the site's purpose first.", "If the user — or you, earlier in this conversation — already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call StartDeployWebsite right away — not a site-creation tool, not the docs.", "Never default to AI or search templates unless the user explicitly requests it. When the user named no creation method - let the user make that choice as the site-creation tools' descriptions direct. Never route normal site creation through ManageWixSite, CallWixSiteAPI, or ExecuteWixAPI.");
|
|
22
22
|
}
|
|
23
23
|
lines.push(`${exception}If the user asks to list, show, or find their Wix sites, ${includeReadme ? 'skip WixREADME and ' : ''}call ListWixSites directly.`);
|
|
24
24
|
if (includeImageUploadGuidance) {
|
|
@@ -80,7 +80,7 @@ export const SITE_CREATION_COPY = {
|
|
|
80
80
|
const SITE_GUIDANCE = dedent `
|
|
81
81
|
A new-site request has two things to settle: what the site is for, and how to build it. The how is AI generation vs. starting from a template, so naming templates, a template id or Wix Studio (Wix Studio is also the template side) already settles it.
|
|
82
82
|
|
|
83
|
-
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call
|
|
83
|
+
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call StartDeployWebsite, which returns the recipe to publish the files yourself (the drop page is only its fallback).
|
|
84
84
|
|
|
85
85
|
Settle what the site is for first: its purpose, topic, business type, audience, or main visitor action. Naming a method is not a description of the site, and neither is the business or industry on its own.
|
|
86
86
|
If you can't tell yet, ask the preferred question below and nothing else — one question, no creation-method question in the same reply, and no internal tool names.
|
|
@@ -472,7 +472,7 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
|
|
|
472
472
|
`,
|
|
473
473
|
'import-claude-design-from-url': dedent `
|
|
474
474
|
Import a design created in Claude's design tool into Wix. Takes the signed claudeusercontent.com URL Claude Design produces for its self-contained HTML bundle (all images, fonts, and styles inlined); any other host is rejected. Creates a live Wix-hosted site and returns its URL.
|
|
475
|
-
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call
|
|
475
|
+
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call StartDeployWebsite instead; it returns the recipe to publish the files yourself.
|
|
476
476
|
`,
|
|
477
477
|
RunWixCliCommand: dedent `
|
|
478
478
|
Executes Wix CLI commands for Wix app development and management.
|
|
@@ -954,7 +954,7 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
|
|
|
954
954
|
Results: each root field fails independently — \`errors[].path\` names the failing field and \`errors[].extensions.message\` the cause (e.g. PERMISSION_DENIED); \`data\` still holds the fields that succeeded. Mutations return the created/updated entity — read the IDs from it and do not re-query to verify. Large results are truncated: narrow the selection or page size instead of re-running.
|
|
955
955
|
Set \`hasMutations: true\` for any document containing a mutation root field.
|
|
956
956
|
`,
|
|
957
|
-
|
|
957
|
+
StartDeployWebsite: dedent `
|
|
958
958
|
The user — or you, earlier in this conversation — ALREADY HAVE a finished page or site, in any form, and it should be live on Wix: HTML/CSS/JS files, a static build (dist/, out/), a zip, another AI builder's export, or a page/design you created in this conversation (export it to HTML first — a finished design IS a finished page). Call this when the user says deploy, host, publish, put online, make it live, get a URL, or upload my site / index.html.
|
|
959
959
|
Also for updating a site deployed this way (replace its files; same site, same URL) and for implementing a backend on one (stores, bookings, CMS, members) as a Wix Headless project — same site, same URL. Works with or without a Wix login (anonymous deploy with a save link), through the Wix MCP alone or from a shell.
|
|
960
960
|
Missing real functionality — a fake checkout, a form that goes nowhere, bookings — is NOT a reason to rebuild the site with a site-creation tool: deploy the page as is, then add the backend afterwards (the recipe covers it).
|
|
@@ -964,7 +964,7 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
|
|
|
964
964
|
CreateWixBusinessGuide: dedent `
|
|
965
965
|
Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
|
|
966
966
|
Call this ONLY when the user explicitly asks for a headless site, a Wix Classic Editor site, or manual/advanced account/API-based site creation — these don't need the site's purpose first. For normal site-creation ${SITE_CREATION_COPY.normalCreationRoute.nonWidget}; for a specific template id, call \`CreateSiteFromTemplate\`.
|
|
967
|
-
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call
|
|
967
|
+
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
|
|
968
968
|
|
|
969
969
|
## What This Tool Contains
|
|
970
970
|
|
package/build/dts/docs/docs.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export interface ReadmeDocConfig {
|
|
|
19
19
|
export interface DocsToolsOptions {
|
|
20
20
|
getToKnowWixEnabled?: boolean;
|
|
21
21
|
createWixBusinessGuideEnabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/** StartDeployWebsite (publish ready-made site files) — an account-owner flow; off for visitor servers. */
|
|
23
|
+
startDeployWebsiteEnabled?: boolean;
|
|
24
24
|
disableTools?: string[];
|
|
25
25
|
/** Custom descriptions for tools, keyed by tool name */
|
|
26
26
|
toolDescriptions?: Record<string, string>;
|
package/build/dts/docs/docs.js
CHANGED
|
@@ -8,7 +8,7 @@ import { fetchPlatformizedMenu, MenuNotFoundError } from './browse-menu.js';
|
|
|
8
8
|
import { isQueryOrSearchEndpoint, QUERY_CAPABILITY_MARKER } from './searchFormatting.js';
|
|
9
9
|
import { addGetToKnowTools, addGetSiteContextTool } from './get-to-know.js';
|
|
10
10
|
import { addCreateWixBusinessGuideTools } from './create-site-guide.js';
|
|
11
|
-
import {
|
|
11
|
+
import { addStartDeployWebsiteTool } from './start-deploy-website.js';
|
|
12
12
|
import { defaultToolDescriptions } from '../config/default-config.js';
|
|
13
13
|
import { desc } from '../config/param-descriptions.js';
|
|
14
14
|
import dedent from 'dedent';
|
|
@@ -68,7 +68,7 @@ export const addDocsTools = (server, allowedTools = [
|
|
|
68
68
|
'CLI',
|
|
69
69
|
'OVERVIEW'
|
|
70
70
|
], options = {}) => {
|
|
71
|
-
const { getToKnowWixEnabled = false, createWixBusinessGuideEnabled = true,
|
|
71
|
+
const { getToKnowWixEnabled = false, createWixBusinessGuideEnabled = true, startDeployWebsiteEnabled = true, disableTools, toolDescriptions, readmeDocs, authStrategy, skillsPortalUrl, skillsRepo, repo, skillsPr, commitHash, skillsTags, dynamicContextEnabled, cliEnabled = false, usePlatformizedSearch = true, usePlatformizedBrowse = true } = options;
|
|
72
72
|
const effectiveRepo = repo ?? skillsRepo;
|
|
73
73
|
const effectiveCommitHash = commitHash ?? skillsPr;
|
|
74
74
|
// Helper to get description (custom or default)
|
|
@@ -126,8 +126,8 @@ export const addDocsTools = (server, allowedTools = [
|
|
|
126
126
|
}
|
|
127
127
|
// On by default: it is a routing slot, not a docs source — the agent with
|
|
128
128
|
// ready-made site files must find it next to the site-creation tools.
|
|
129
|
-
if (
|
|
130
|
-
|
|
129
|
+
if (startDeployWebsiteEnabled) {
|
|
130
|
+
addStartDeployWebsiteTool(server, disableTools || [], toolDescriptions, {
|
|
131
131
|
skillsPortalUrl,
|
|
132
132
|
repo: effectiveRepo,
|
|
133
133
|
commitHash: effectiveCommitHash
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WixMcpServer } from '../wix-mcp-server.js';
|
|
2
|
+
export declare const START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION = "A few sentences covering: the user's request (quoted if short); what the site is \u2014 its purpose and who it is for \u2014 and its current form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation), roughly how many files, and whether it includes images; what the site must be able to do for its visitors beyond showing pages, if anything \u2014 selling, bookings or reservations, tickets, menus and orders, rentals, forms, memberships or paid plans, donations, a blog, or anything else the user expects to work \u2014 described in your own words, or a note that it is a plain static site with no such needs; which agent or product you are and the harness you run in.";
|
|
3
|
+
export declare const START_DEPLOY_WEBSITE_TOOL_NAME = "StartDeployWebsite";
|
|
4
|
+
export declare const START_DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
5
|
+
export declare const DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
6
|
+
export declare function startDeployWebsiteResponse(recipe: string): string;
|
|
7
|
+
export declare const START_DEPLOY_WEBSITE_POINTER_RESPONSE: string;
|
|
8
|
+
export interface StartDeployWebsiteFetchOptions {
|
|
9
|
+
skillsPortalUrl?: string;
|
|
10
|
+
repo?: string;
|
|
11
|
+
commitHash?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function addStartDeployWebsiteTool(server: WixMcpServer, disableTools?: string[], toolDescriptions?: Record<string, string>, fetchOptions?: StartDeployWebsiteFetchOptions): void;
|
|
14
|
+
//# sourceMappingURL=start-deploy-website.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defaultToolDescriptions } from '../config/default-config.js';
|
|
3
|
+
import { fetchArticleContent } from './fetch-article.js';
|
|
4
|
+
// Longer than the one-sentence `reason` on other tools: it is the only record of
|
|
5
|
+
// who deploys what. Read by people via BI; it does not change the response.
|
|
6
|
+
export const START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION = "A few sentences covering: the user's request (quoted if short); what the site is — its purpose and who it is for — and its current form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation), roughly how many files, and whether it includes images; what the site must be able to do for its visitors beyond showing pages, if anything — selling, bookings or reservations, tickets, menus and orders, rentals, forms, memberships or paid plans, donations, a blog, or anything else the user expects to work — described in your own words, or a note that it is a plain static site with no such needs; which agent or product you are and the harness you run in.";
|
|
7
|
+
export const START_DEPLOY_WEBSITE_TOOL_NAME = 'StartDeployWebsite';
|
|
8
|
+
export const START_DEPLOY_WEBSITE_RECIPE_URL = 'https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md';
|
|
9
|
+
export const DROP_PAGE_URL = 'https://www.wix.com/headless/drop?utm_campaign=mcp';
|
|
10
|
+
const FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} — give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
11
|
+
// The tool exists to take the agent's attention at routing time; the work itself
|
|
12
|
+
// is the recipe, so the response IS the recipe — fetched live and returned whole,
|
|
13
|
+
// so the agent never has to decide whether to go read it.
|
|
14
|
+
export function startDeployWebsiteResponse(recipe) {
|
|
15
|
+
return [
|
|
16
|
+
`The following is the content of ${START_DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself — do not hand the user instructions.`,
|
|
17
|
+
FALLBACK_LINE,
|
|
18
|
+
'---',
|
|
19
|
+
recipe.trim()
|
|
20
|
+
].join('\n\n');
|
|
21
|
+
}
|
|
22
|
+
// When the recipe can't be fetched, the pointer still routes correctly.
|
|
23
|
+
export const START_DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
24
|
+
`Read and follow this recipe end to end: ${START_DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
25
|
+
'It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself — do not hand the user instructions.',
|
|
26
|
+
FALLBACK_LINE
|
|
27
|
+
].join('\n\n');
|
|
28
|
+
export function addStartDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
29
|
+
if (disableTools.includes(START_DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
server.tool(START_DEPLOY_WEBSITE_TOOL_NAME, toolDescriptions?.[START_DEPLOY_WEBSITE_TOOL_NAME] ??
|
|
33
|
+
defaultToolDescriptions[START_DEPLOY_WEBSITE_TOOL_NAME], {
|
|
34
|
+
brief: z.string().min(1).describe(START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION)
|
|
35
|
+
}, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (_args, { httpClient }) => {
|
|
36
|
+
let text = START_DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
37
|
+
try {
|
|
38
|
+
// Same path ReadFullDocsArticle takes for this page: the rawdocs article
|
|
39
|
+
// API, addressed without the .md suffix, header scaffolding stripped.
|
|
40
|
+
const recipe = await fetchArticleContent(httpClient, START_DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ''), 'article', true, fetchOptions.skillsPortalUrl, fetchOptions.repo, fetchOptions.commitHash);
|
|
41
|
+
if (recipe && recipe.trim()) {
|
|
42
|
+
text = startDeployWebsiteResponse(recipe);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
console.warn(`[StartDeployWebsite] recipe fetch failed, returning the pointer:`, error instanceof Error ? error.message : error);
|
|
47
|
+
}
|
|
48
|
+
return { content: [{ type: 'text', text }] };
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=start-deploy-website.js.map
|
|
@@ -86,11 +86,11 @@ export function addImportClaudeDesignTool(server, authStrategy, options) {
|
|
|
86
86
|
designUrl = new URL(args.url);
|
|
87
87
|
}
|
|
88
88
|
catch {
|
|
89
|
-
return errorResult("Invalid design URL — this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool — call
|
|
89
|
+
return errorResult("Invalid design URL — this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp.");
|
|
90
90
|
}
|
|
91
91
|
if (designUrl.protocol !== 'https:' ||
|
|
92
92
|
!designUrl.hostname.endsWith(CLAUDE_USER_CONTENT_HOST_SUFFIX)) {
|
|
93
|
-
return errorResult("Invalid design URL — this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool — call
|
|
93
|
+
return errorResult("Invalid design URL — this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp.");
|
|
94
94
|
}
|
|
95
95
|
// Resolve the caller's account identity BEFORE the design fetch — the
|
|
96
96
|
// design URL is single-use, so an unauthenticated caller must fail
|
|
@@ -127,8 +127,8 @@ export interface ReadmeDocConfig {
|
|
|
127
127
|
export interface DocsToolsOptions {
|
|
128
128
|
getToKnowWixEnabled?: boolean;
|
|
129
129
|
createWixBusinessGuideEnabled?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
|
|
130
|
+
/** StartDeployWebsite (publish ready-made site files) — an account-owner flow; off for visitor servers. */
|
|
131
|
+
startDeployWebsiteEnabled?: boolean;
|
|
132
132
|
disableTools?: string[];
|
|
133
133
|
/** Custom descriptions for tools, keyed by tool name */
|
|
134
134
|
toolDescriptions?: Record<string, string>;
|
|
@@ -127,8 +127,8 @@ export interface ReadmeDocConfig {
|
|
|
127
127
|
export interface DocsToolsOptions {
|
|
128
128
|
getToKnowWixEnabled?: boolean;
|
|
129
129
|
createWixBusinessGuideEnabled?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
|
|
130
|
+
/** StartDeployWebsite (publish ready-made site files) — an account-owner flow; off for visitor servers. */
|
|
131
|
+
startDeployWebsiteEnabled?: boolean;
|
|
132
132
|
disableTools?: string[];
|
|
133
133
|
/** Custom descriptions for tools, keyed by tool name */
|
|
134
134
|
toolDescriptions?: Record<string, string>;
|
package/build/esm/index.js
CHANGED
|
@@ -30928,7 +30928,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
|
|
|
30928
30928
|
"if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.",
|
|
30929
30929
|
"**Exception \u2014 creating a new Wix site/website:** For a normal creation request \u2014 and only then \u2014 skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.",
|
|
30930
30930
|
"If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away \u2014 these don't need the site's purpose first.",
|
|
30931
|
-
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call
|
|
30931
|
+
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call StartDeployWebsite right away \u2014 not a site-creation tool, not the docs.",
|
|
30932
30932
|
"Never default to AI or search templates unless the user explicitly requests it. When the user named no creation method - let the user make that choice as the site-creation tools' descriptions direct. Never route normal site creation through ManageWixSite, CallWixSiteAPI, or ExecuteWixAPI."
|
|
30933
30933
|
);
|
|
30934
30934
|
}
|
|
@@ -31010,7 +31010,7 @@ var SITE_CREATION_COPY = {
|
|
|
31010
31010
|
var SITE_GUIDANCE = dedent_default`
|
|
31011
31011
|
A new-site request has two things to settle: what the site is for, and how to build it. The how is AI generation vs. starting from a template, so naming templates, a template id or Wix Studio (Wix Studio is also the template side) already settles it.
|
|
31012
31012
|
|
|
31013
|
-
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call
|
|
31013
|
+
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call StartDeployWebsite, which returns the recipe to publish the files yourself (the drop page is only its fallback).
|
|
31014
31014
|
|
|
31015
31015
|
Settle what the site is for first: its purpose, topic, business type, audience, or main visitor action. Naming a method is not a description of the site, and neither is the business or industry on its own.
|
|
31016
31016
|
If you can't tell yet, ask the preferred question below and nothing else — one question, no creation-method question in the same reply, and no internal tool names.
|
|
@@ -31402,7 +31402,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
31402
31402
|
`,
|
|
31403
31403
|
"import-claude-design-from-url": dedent_default`
|
|
31404
31404
|
Import a design created in Claude's design tool into Wix. Takes the signed claudeusercontent.com URL Claude Design produces for its self-contained HTML bundle (all images, fonts, and styles inlined); any other host is rejected. Creates a live Wix-hosted site and returns its URL.
|
|
31405
|
-
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call
|
|
31405
|
+
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call StartDeployWebsite instead; it returns the recipe to publish the files yourself.
|
|
31406
31406
|
`,
|
|
31407
31407
|
RunWixCliCommand: dedent_default`
|
|
31408
31408
|
Executes Wix CLI commands for Wix app development and management.
|
|
@@ -31884,7 +31884,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
31884
31884
|
Results: each root field fails independently — \`errors[].path\` names the failing field and \`errors[].extensions.message\` the cause (e.g. PERMISSION_DENIED); \`data\` still holds the fields that succeeded. Mutations return the created/updated entity — read the IDs from it and do not re-query to verify. Large results are truncated: narrow the selection or page size instead of re-running.
|
|
31885
31885
|
Set \`hasMutations: true\` for any document containing a mutation root field.
|
|
31886
31886
|
`,
|
|
31887
|
-
|
|
31887
|
+
StartDeployWebsite: dedent_default`
|
|
31888
31888
|
The user — or you, earlier in this conversation — ALREADY HAVE a finished page or site, in any form, and it should be live on Wix: HTML/CSS/JS files, a static build (dist/, out/), a zip, another AI builder's export, or a page/design you created in this conversation (export it to HTML first — a finished design IS a finished page). Call this when the user says deploy, host, publish, put online, make it live, get a URL, or upload my site / index.html.
|
|
31889
31889
|
Also for updating a site deployed this way (replace its files; same site, same URL) and for implementing a backend on one (stores, bookings, CMS, members) as a Wix Headless project — same site, same URL. Works with or without a Wix login (anonymous deploy with a save link), through the Wix MCP alone or from a shell.
|
|
31890
31890
|
Missing real functionality — a fake checkout, a form that goes nowhere, bookings — is NOT a reason to rebuild the site with a site-creation tool: deploy the page as is, then add the backend afterwards (the recipe covers it).
|
|
@@ -31894,7 +31894,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
31894
31894
|
CreateWixBusinessGuide: dedent_default`
|
|
31895
31895
|
Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
|
|
31896
31896
|
Call this ONLY when the user explicitly asks for a headless site, a Wix Classic Editor site, or manual/advanced account/API-based site creation — these don't need the site's purpose first. For normal site-creation ${SITE_CREATION_COPY.normalCreationRoute.nonWidget}; for a specific template id, call \`CreateSiteFromTemplate\`.
|
|
31897
|
-
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call
|
|
31897
|
+
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
|
|
31898
31898
|
|
|
31899
31899
|
## What This Tool Contains
|
|
31900
31900
|
|
|
@@ -33041,39 +33041,42 @@ ${articleContent}${nextSteps}`;
|
|
|
33041
33041
|
);
|
|
33042
33042
|
}
|
|
33043
33043
|
|
|
33044
|
-
// src/docs/deploy-website.ts
|
|
33045
|
-
var
|
|
33046
|
-
var
|
|
33044
|
+
// src/docs/start-deploy-website.ts
|
|
33045
|
+
var START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION = "A few sentences covering: the user's request (quoted if short); what the site is \u2014 its purpose and who it is for \u2014 and its current form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation), roughly how many files, and whether it includes images; what the site must be able to do for its visitors beyond showing pages, if anything \u2014 selling, bookings or reservations, tickets, menus and orders, rentals, forms, memberships or paid plans, donations, a blog, or anything else the user expects to work \u2014 described in your own words, or a note that it is a plain static site with no such needs; which agent or product you are and the harness you run in.";
|
|
33046
|
+
var START_DEPLOY_WEBSITE_TOOL_NAME = "StartDeployWebsite";
|
|
33047
|
+
var START_DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
33047
33048
|
var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
33048
33049
|
var FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} \u2014 give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
33049
|
-
function
|
|
33050
|
+
function startDeployWebsiteResponse(recipe) {
|
|
33050
33051
|
return [
|
|
33051
|
-
`The following is the content of ${
|
|
33052
|
+
`The following is the content of ${START_DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself \u2014 do not hand the user instructions.`,
|
|
33052
33053
|
FALLBACK_LINE,
|
|
33053
33054
|
"---",
|
|
33054
33055
|
recipe.trim()
|
|
33055
33056
|
].join("\n\n");
|
|
33056
33057
|
}
|
|
33057
|
-
var
|
|
33058
|
-
`Read and follow this recipe end to end: ${
|
|
33058
|
+
var START_DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
33059
|
+
`Read and follow this recipe end to end: ${START_DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
33059
33060
|
"It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself \u2014 do not hand the user instructions.",
|
|
33060
33061
|
FALLBACK_LINE
|
|
33061
33062
|
].join("\n\n");
|
|
33062
|
-
function
|
|
33063
|
-
if (disableTools.includes(
|
|
33063
|
+
function addStartDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
33064
|
+
if (disableTools.includes(START_DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
33064
33065
|
return;
|
|
33065
33066
|
}
|
|
33066
33067
|
server.tool(
|
|
33067
|
-
|
|
33068
|
-
toolDescriptions?.[
|
|
33069
|
-
{
|
|
33068
|
+
START_DEPLOY_WEBSITE_TOOL_NAME,
|
|
33069
|
+
toolDescriptions?.[START_DEPLOY_WEBSITE_TOOL_NAME] ?? defaultToolDescriptions[START_DEPLOY_WEBSITE_TOOL_NAME],
|
|
33070
|
+
{
|
|
33071
|
+
brief: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION)
|
|
33072
|
+
},
|
|
33070
33073
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
33071
33074
|
async (_args, { httpClient: httpClient6 }) => {
|
|
33072
|
-
let text =
|
|
33075
|
+
let text = START_DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
33073
33076
|
try {
|
|
33074
33077
|
const recipe = await fetchArticleContent(
|
|
33075
33078
|
httpClient6,
|
|
33076
|
-
|
|
33079
|
+
START_DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ""),
|
|
33077
33080
|
"article",
|
|
33078
33081
|
true,
|
|
33079
33082
|
fetchOptions.skillsPortalUrl,
|
|
@@ -33081,11 +33084,11 @@ function addDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetch
|
|
|
33081
33084
|
fetchOptions.commitHash
|
|
33082
33085
|
);
|
|
33083
33086
|
if (recipe && recipe.trim()) {
|
|
33084
|
-
text =
|
|
33087
|
+
text = startDeployWebsiteResponse(recipe);
|
|
33085
33088
|
}
|
|
33086
33089
|
} catch (error2) {
|
|
33087
33090
|
console.warn(
|
|
33088
|
-
`[
|
|
33091
|
+
`[StartDeployWebsite] recipe fetch failed, returning the pointer:`,
|
|
33089
33092
|
error2 instanceof Error ? error2.message : error2
|
|
33090
33093
|
);
|
|
33091
33094
|
}
|
|
@@ -33153,7 +33156,7 @@ var addDocsTools = (server, allowedTools = [
|
|
|
33153
33156
|
const {
|
|
33154
33157
|
getToKnowWixEnabled = false,
|
|
33155
33158
|
createWixBusinessGuideEnabled = true,
|
|
33156
|
-
|
|
33159
|
+
startDeployWebsiteEnabled = true,
|
|
33157
33160
|
disableTools,
|
|
33158
33161
|
toolDescriptions,
|
|
33159
33162
|
readmeDocs,
|
|
@@ -33219,8 +33222,8 @@ var addDocsTools = (server, allowedTools = [
|
|
|
33219
33222
|
cliEnabled
|
|
33220
33223
|
);
|
|
33221
33224
|
}
|
|
33222
|
-
if (
|
|
33223
|
-
|
|
33225
|
+
if (startDeployWebsiteEnabled) {
|
|
33226
|
+
addStartDeployWebsiteTool(server, disableTools || [], toolDescriptions, {
|
|
33224
33227
|
skillsPortalUrl,
|
|
33225
33228
|
repo: effectiveRepo,
|
|
33226
33229
|
commitHash: effectiveCommitHash
|
|
@@ -46002,12 +46005,12 @@ function addImportClaudeDesignTool(server, authStrategy, options) {
|
|
|
46002
46005
|
designUrl = new URL(args.url);
|
|
46003
46006
|
} catch {
|
|
46004
46007
|
return errorResult(
|
|
46005
|
-
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call
|
|
46008
|
+
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call StartDeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp."
|
|
46006
46009
|
);
|
|
46007
46010
|
}
|
|
46008
46011
|
if (designUrl.protocol !== "https:" || !designUrl.hostname.endsWith(CLAUDE_USER_CONTENT_HOST_SUFFIX)) {
|
|
46009
46012
|
return errorResult(
|
|
46010
|
-
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call
|
|
46013
|
+
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call StartDeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp."
|
|
46011
46014
|
);
|
|
46012
46015
|
}
|
|
46013
46016
|
const accountHeaders = await authStrategy.getAccountAuthHeaders();
|
package/build/esm/toolkit.js
CHANGED
|
@@ -12124,7 +12124,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
|
|
|
12124
12124
|
"if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.",
|
|
12125
12125
|
"**Exception \u2014 creating a new Wix site/website:** For a normal creation request \u2014 and only then \u2014 skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.",
|
|
12126
12126
|
"If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away \u2014 these don't need the site's purpose first.",
|
|
12127
|
-
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call
|
|
12127
|
+
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call StartDeployWebsite right away \u2014 not a site-creation tool, not the docs.",
|
|
12128
12128
|
"Never default to AI or search templates unless the user explicitly requests it. When the user named no creation method - let the user make that choice as the site-creation tools' descriptions direct. Never route normal site creation through ManageWixSite, CallWixSiteAPI, or ExecuteWixAPI."
|
|
12129
12129
|
);
|
|
12130
12130
|
}
|
|
@@ -12206,7 +12206,7 @@ var SITE_CREATION_COPY = {
|
|
|
12206
12206
|
var SITE_GUIDANCE = dedent_default`
|
|
12207
12207
|
A new-site request has two things to settle: what the site is for, and how to build it. The how is AI generation vs. starting from a template, so naming templates, a template id or Wix Studio (Wix Studio is also the template side) already settles it.
|
|
12208
12208
|
|
|
12209
|
-
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call
|
|
12209
|
+
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call StartDeployWebsite, which returns the recipe to publish the files yourself (the drop page is only its fallback).
|
|
12210
12210
|
|
|
12211
12211
|
Settle what the site is for first: its purpose, topic, business type, audience, or main visitor action. Naming a method is not a description of the site, and neither is the business or industry on its own.
|
|
12212
12212
|
If you can't tell yet, ask the preferred question below and nothing else — one question, no creation-method question in the same reply, and no internal tool names.
|
|
@@ -12598,7 +12598,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
12598
12598
|
`,
|
|
12599
12599
|
"import-claude-design-from-url": dedent_default`
|
|
12600
12600
|
Import a design created in Claude's design tool into Wix. Takes the signed claudeusercontent.com URL Claude Design produces for its self-contained HTML bundle (all images, fonts, and styles inlined); any other host is rejected. Creates a live Wix-hosted site and returns its URL.
|
|
12601
|
-
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call
|
|
12601
|
+
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call StartDeployWebsite instead; it returns the recipe to publish the files yourself.
|
|
12602
12602
|
`,
|
|
12603
12603
|
RunWixCliCommand: dedent_default`
|
|
12604
12604
|
Executes Wix CLI commands for Wix app development and management.
|
|
@@ -13080,7 +13080,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
13080
13080
|
Results: each root field fails independently — \`errors[].path\` names the failing field and \`errors[].extensions.message\` the cause (e.g. PERMISSION_DENIED); \`data\` still holds the fields that succeeded. Mutations return the created/updated entity — read the IDs from it and do not re-query to verify. Large results are truncated: narrow the selection or page size instead of re-running.
|
|
13081
13081
|
Set \`hasMutations: true\` for any document containing a mutation root field.
|
|
13082
13082
|
`,
|
|
13083
|
-
|
|
13083
|
+
StartDeployWebsite: dedent_default`
|
|
13084
13084
|
The user — or you, earlier in this conversation — ALREADY HAVE a finished page or site, in any form, and it should be live on Wix: HTML/CSS/JS files, a static build (dist/, out/), a zip, another AI builder's export, or a page/design you created in this conversation (export it to HTML first — a finished design IS a finished page). Call this when the user says deploy, host, publish, put online, make it live, get a URL, or upload my site / index.html.
|
|
13085
13085
|
Also for updating a site deployed this way (replace its files; same site, same URL) and for implementing a backend on one (stores, bookings, CMS, members) as a Wix Headless project — same site, same URL. Works with or without a Wix login (anonymous deploy with a save link), through the Wix MCP alone or from a shell.
|
|
13086
13086
|
Missing real functionality — a fake checkout, a form that goes nowhere, bookings — is NOT a reason to rebuild the site with a site-creation tool: deploy the page as is, then add the backend afterwards (the recipe covers it).
|
|
@@ -13090,7 +13090,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
13090
13090
|
CreateWixBusinessGuide: dedent_default`
|
|
13091
13091
|
Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
|
|
13092
13092
|
Call this ONLY when the user explicitly asks for a headless site, a Wix Classic Editor site, or manual/advanced account/API-based site creation — these don't need the site's purpose first. For normal site-creation ${SITE_CREATION_COPY.normalCreationRoute.nonWidget}; for a specific template id, call \`CreateSiteFromTemplate\`.
|
|
13093
|
-
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call
|
|
13093
|
+
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call StartDeployWebsite, which returns the recipe to publish the files yourself. This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
|
|
13094
13094
|
|
|
13095
13095
|
## What This Tool Contains
|
|
13096
13096
|
|
|
@@ -14237,39 +14237,42 @@ ${articleContent}${nextSteps}`;
|
|
|
14237
14237
|
);
|
|
14238
14238
|
}
|
|
14239
14239
|
|
|
14240
|
-
// src/docs/deploy-website.ts
|
|
14241
|
-
var
|
|
14242
|
-
var
|
|
14240
|
+
// src/docs/start-deploy-website.ts
|
|
14241
|
+
var START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION = "A few sentences covering: the user's request (quoted if short); what the site is \u2014 its purpose and who it is for \u2014 and its current form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation), roughly how many files, and whether it includes images; what the site must be able to do for its visitors beyond showing pages, if anything \u2014 selling, bookings or reservations, tickets, menus and orders, rentals, forms, memberships or paid plans, donations, a blog, or anything else the user expects to work \u2014 described in your own words, or a note that it is a plain static site with no such needs; which agent or product you are and the harness you run in.";
|
|
14242
|
+
var START_DEPLOY_WEBSITE_TOOL_NAME = "StartDeployWebsite";
|
|
14243
|
+
var START_DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
14243
14244
|
var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
14244
14245
|
var FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} \u2014 give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
14245
|
-
function
|
|
14246
|
+
function startDeployWebsiteResponse(recipe) {
|
|
14246
14247
|
return [
|
|
14247
|
-
`The following is the content of ${
|
|
14248
|
+
`The following is the content of ${START_DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself \u2014 do not hand the user instructions.`,
|
|
14248
14249
|
FALLBACK_LINE,
|
|
14249
14250
|
"---",
|
|
14250
14251
|
recipe.trim()
|
|
14251
14252
|
].join("\n\n");
|
|
14252
14253
|
}
|
|
14253
|
-
var
|
|
14254
|
-
`Read and follow this recipe end to end: ${
|
|
14254
|
+
var START_DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
14255
|
+
`Read and follow this recipe end to end: ${START_DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
14255
14256
|
"It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself \u2014 do not hand the user instructions.",
|
|
14256
14257
|
FALLBACK_LINE
|
|
14257
14258
|
].join("\n\n");
|
|
14258
|
-
function
|
|
14259
|
-
if (disableTools.includes(
|
|
14259
|
+
function addStartDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
14260
|
+
if (disableTools.includes(START_DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
14260
14261
|
return;
|
|
14261
14262
|
}
|
|
14262
14263
|
server.tool(
|
|
14263
|
-
|
|
14264
|
-
toolDescriptions?.[
|
|
14265
|
-
{
|
|
14264
|
+
START_DEPLOY_WEBSITE_TOOL_NAME,
|
|
14265
|
+
toolDescriptions?.[START_DEPLOY_WEBSITE_TOOL_NAME] ?? defaultToolDescriptions[START_DEPLOY_WEBSITE_TOOL_NAME],
|
|
14266
|
+
{
|
|
14267
|
+
brief: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION)
|
|
14268
|
+
},
|
|
14266
14269
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
14267
14270
|
async (_args, { httpClient }) => {
|
|
14268
|
-
let text =
|
|
14271
|
+
let text = START_DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
14269
14272
|
try {
|
|
14270
14273
|
const recipe = await fetchArticleContent(
|
|
14271
14274
|
httpClient,
|
|
14272
|
-
|
|
14275
|
+
START_DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ""),
|
|
14273
14276
|
"article",
|
|
14274
14277
|
true,
|
|
14275
14278
|
fetchOptions.skillsPortalUrl,
|
|
@@ -14277,11 +14280,11 @@ function addDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetch
|
|
|
14277
14280
|
fetchOptions.commitHash
|
|
14278
14281
|
);
|
|
14279
14282
|
if (recipe && recipe.trim()) {
|
|
14280
|
-
text =
|
|
14283
|
+
text = startDeployWebsiteResponse(recipe);
|
|
14281
14284
|
}
|
|
14282
14285
|
} catch (error) {
|
|
14283
14286
|
console.warn(
|
|
14284
|
-
`[
|
|
14287
|
+
`[StartDeployWebsite] recipe fetch failed, returning the pointer:`,
|
|
14285
14288
|
error instanceof Error ? error.message : error
|
|
14286
14289
|
);
|
|
14287
14290
|
}
|
|
@@ -14338,7 +14341,7 @@ var addDocsTools = (server, allowedTools = [
|
|
|
14338
14341
|
const {
|
|
14339
14342
|
getToKnowWixEnabled = false,
|
|
14340
14343
|
createWixBusinessGuideEnabled = true,
|
|
14341
|
-
|
|
14344
|
+
startDeployWebsiteEnabled = true,
|
|
14342
14345
|
disableTools,
|
|
14343
14346
|
toolDescriptions,
|
|
14344
14347
|
readmeDocs,
|
|
@@ -14404,8 +14407,8 @@ var addDocsTools = (server, allowedTools = [
|
|
|
14404
14407
|
cliEnabled
|
|
14405
14408
|
);
|
|
14406
14409
|
}
|
|
14407
|
-
if (
|
|
14408
|
-
|
|
14410
|
+
if (startDeployWebsiteEnabled) {
|
|
14411
|
+
addStartDeployWebsiteTool(server, disableTools || [], toolDescriptions, {
|
|
14409
14412
|
skillsPortalUrl,
|
|
14410
14413
|
repo: effectiveRepo,
|
|
14411
14414
|
commitHash: effectiveCommitHash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.91",
|
|
4
4
|
"description": "A Model Context Protocol server for Wix AI tools",
|
|
5
5
|
"bin": "./build/bin-standalone.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
]
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
-
"falconPackageHash": "
|
|
136
|
+
"falconPackageHash": "c5d7f7479d90baedf03a7fc23cfb7166fe5c4ce1d88c647d3027e414"
|
|
137
137
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WixMcpServer } from '../wix-mcp-server.js';
|
|
2
|
-
export declare const DEPLOY_WEBSITE_TOOL_NAME = "DeployWebsite";
|
|
3
|
-
export declare const DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
4
|
-
export declare const DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
5
|
-
export declare function deployWebsiteResponse(recipe: string): string;
|
|
6
|
-
export declare const DEPLOY_WEBSITE_POINTER_RESPONSE: string;
|
|
7
|
-
export interface DeployWebsiteFetchOptions {
|
|
8
|
-
skillsPortalUrl?: string;
|
|
9
|
-
repo?: string;
|
|
10
|
-
commitHash?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function addDeployWebsiteTool(server: WixMcpServer, disableTools?: string[], toolDescriptions?: Record<string, string>, fetchOptions?: DeployWebsiteFetchOptions): void;
|
|
13
|
-
//# sourceMappingURL=deploy-website.d.ts.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defaultToolDescriptions } from '../config/default-config.js';
|
|
2
|
-
import { fetchArticleContent } from './fetch-article.js';
|
|
3
|
-
export const DEPLOY_WEBSITE_TOOL_NAME = 'DeployWebsite';
|
|
4
|
-
export const DEPLOY_WEBSITE_RECIPE_URL = 'https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md';
|
|
5
|
-
export const DROP_PAGE_URL = 'https://www.wix.com/headless/drop?utm_campaign=mcp';
|
|
6
|
-
const FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} — give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
7
|
-
// The tool exists to take the agent's attention at routing time; the work itself
|
|
8
|
-
// is the recipe, so the response IS the recipe — fetched live and returned whole,
|
|
9
|
-
// so the agent never has to decide whether to go read it.
|
|
10
|
-
export function deployWebsiteResponse(recipe) {
|
|
11
|
-
return [
|
|
12
|
-
`The following is the content of ${DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself — do not hand the user instructions.`,
|
|
13
|
-
FALLBACK_LINE,
|
|
14
|
-
'---',
|
|
15
|
-
recipe.trim()
|
|
16
|
-
].join('\n\n');
|
|
17
|
-
}
|
|
18
|
-
// When the recipe can't be fetched, the pointer still routes correctly.
|
|
19
|
-
export const DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
20
|
-
`Read and follow this recipe end to end: ${DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
21
|
-
'It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself — do not hand the user instructions.',
|
|
22
|
-
FALLBACK_LINE
|
|
23
|
-
].join('\n\n');
|
|
24
|
-
export function addDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
25
|
-
if (disableTools.includes(DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
server.tool(DEPLOY_WEBSITE_TOOL_NAME, toolDescriptions?.[DEPLOY_WEBSITE_TOOL_NAME] ??
|
|
29
|
-
defaultToolDescriptions[DEPLOY_WEBSITE_TOOL_NAME], {}, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (_args, { httpClient }) => {
|
|
30
|
-
let text = DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
31
|
-
try {
|
|
32
|
-
// Same path ReadFullDocsArticle takes for this page: the rawdocs article
|
|
33
|
-
// API, addressed without the .md suffix, header scaffolding stripped.
|
|
34
|
-
const recipe = await fetchArticleContent(httpClient, DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ''), 'article', true, fetchOptions.skillsPortalUrl, fetchOptions.repo, fetchOptions.commitHash);
|
|
35
|
-
if (recipe && recipe.trim()) {
|
|
36
|
-
text = deployWebsiteResponse(recipe);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
console.warn(`[DeployWebsite] recipe fetch failed, returning the pointer:`, error instanceof Error ? error.message : error);
|
|
41
|
-
}
|
|
42
|
-
return { content: [{ type: 'text', text }] };
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=deploy-website.js.map
|