@wix/mcp 1.0.93 → 1.0.94

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.
Files changed (35) hide show
  1. package/build/bin-standalone.js +143 -193
  2. package/build/cjs/index.cjs +503 -196
  3. package/build/cjs/toolkit.cjs +471 -189
  4. package/build/dts/api-call/index.js +6 -3
  5. package/build/dts/api-call/site-files.d.ts +28 -0
  6. package/build/dts/api-call/site-files.js +194 -0
  7. package/build/dts/api-call/upload-headless-website-files.d.ts +35 -0
  8. package/build/dts/api-call/upload-headless-website-files.js +171 -0
  9. package/build/dts/bin.js +3 -6
  10. package/build/dts/code-mode/attachments.js +1 -1
  11. package/build/dts/code-mode/index.js +18 -4
  12. package/build/dts/config/default-config.d.ts +0 -4
  13. package/build/dts/config/default-config.js +36 -51
  14. package/build/dts/config/param-descriptions.js +2 -2
  15. package/build/dts/docs/docs.d.ts +4 -2
  16. package/build/dts/docs/docs.js +11 -7
  17. package/build/dts/docs/fetch-article.js +4 -1
  18. package/build/dts/docs/get-to-know.js +1 -1
  19. package/build/dts/docs/start-headless-build.d.ts +19 -0
  20. package/build/dts/docs/start-headless-build.js +74 -0
  21. package/build/dts/graphql/index.js +3 -1
  22. package/build/dts/import-claude-design-tool/index.js +2 -2
  23. package/build/dts/index.d.ts +1 -0
  24. package/build/dts/index.js +1 -0
  25. package/build/dts/site-widget-tools/search-site-templates-tool/index.js +17 -7
  26. package/build/dts/toolkit-entry.d.cts +4 -2
  27. package/build/dts/toolkit-entry.d.ts +4 -2
  28. package/build/dts/toolkit.js +9 -0
  29. package/build/dts/wix-mcp-server.d.ts +2 -0
  30. package/build/dts/wix-mcp-server.js +4 -0
  31. package/build/esm/index.js +501 -196
  32. package/build/esm/toolkit.js +471 -189
  33. package/package.json +2 -2
  34. package/build/dts/docs/create-site-guide.d.ts +0 -3
  35. package/build/dts/docs/create-site-guide.js +0 -109
@@ -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 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.");
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.', "**Creating a new Wix site — and only then — skip WixREADME and the docs.** First settle one thing: will the user keep working on this site with you, in code, or design it themselves in Wix's editor? In code — you or the user have code, the two of you designed it here, they asked you to build it, they asked for a headless site, or it is an app: StartDeployWebsite if the code exists in any form, StartHeadlessBuild if not, called right away (it only returns the guide; the site's purpose is not needed first). In Wix's editor: the site-creation tools; their descriptions carry the rules. Everything else starts with WixREADME as usual.", "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 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) {
@@ -43,9 +43,8 @@ export function buildSystemReminder(includeReadme, includeImageUploadGuidance =
43
43
  const guidelines = buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance);
44
44
  const flows = buildSystemReminderFlows(includeReadme);
45
45
  return dedent `
46
- <agent-mandatory-instructions>
47
- YOU MUST READ AND FOLLOW THE AGENT-MANDATORY-INSTRUCTIONS BELOW
48
- A FAILURE TO DO SO WILL RESULT IN ERRORS AND CRITICAL ISSUES.
46
+ <wix-usage-guide>
47
+ How to work with Wix through these tools. Following these steps avoids failed or incorrect API calls.
49
48
  <goal>
50
49
  ${AGENT_GOAL}
51
50
  </goal>
@@ -55,7 +54,7 @@ export function buildSystemReminder(includeReadme, includeImageUploadGuidance =
55
54
  <flow-description>
56
55
  ${flows}
57
56
  </flow-description>
58
- </agent-mandatory-instructions>
57
+ </wix-usage-guide>
59
58
  `;
60
59
  }
61
60
  export const SYSTEM_REMINDER = buildSystemReminder(true);
@@ -67,22 +66,17 @@ export const SITE_CREATION_COPY = {
67
66
  unstatedMethod: {
68
67
  nonWidget: 'you MUST ask whether they want to build with AI or start from a template, and create nothing and show nothing until they answer',
69
68
  widget: 'you MUST call `WixSiteCreation` and let them choose'
70
- },
71
- normalCreationRoute: {
72
- nonWidget: 'route those through `WixSiteBuilder` or `SearchSiteTemplates`',
73
- widget: 'route those through `WixSiteCreation`'
74
69
  }
75
70
  };
76
71
  /**
77
72
  * Carried by every tool that can start creating a site, so no route skips it.
78
- * `CreateWixBusinessGuide` is exempt: headless/classic/manual don't need the site's purpose.
79
73
  */
80
74
  const SITE_GUIDANCE = dedent `
81
- First decide which of two different things is being asked for:
82
- - The site is code the user or you control — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page or design you made earlier in this conversation — and it should go live on Wix. This is also the route whenever the user wants to keep working on the site here, with you: a Wix Headless site is a regular coded site, so you keep full control of the design and can change and redeploy it from this conversation at any time, and Wix business capabilities can be added to it as a backend when they are needed. Call StartDeployWebsite: it returns the recipe to host those exact files as a Wix Headless site (updates reuse the same site and URL; the drop page is only its fallback). Do not offer AI or templates for this and do not call any site-creation tool.
83
- - Wix should create the site — generated with AI from a description, or started from a template — and the user will design and edit it in Wix rather than through you. That is what the site-creation tools do; they never take files you already have.
75
+ First decide who keeps building the site:
76
+ - **You, in code**: a Wix Headless site, with full control of the design, changed and redeployed from this conversation, Wix business features added as a backend. This is the case when you or the user have code (hand-written files, a static build, a zip, another builder's export, a page you made here): call StartDeployWebsite. It is also the case when nothing is coded yet but the user asked you to build it or asked for a headless site, the two of you worked out its design in this conversation, or it is an app (a game, a dashboard, a tool): call StartHeadlessBuild right away, before asking what the site is for. Do not offer AI or templates for either.
77
+ - **The user, in Wix's editor**: Wix generates it with AI or starts it from a template, and the user designs it in Wix. That is what the site-creation tools do; they never take files you already have.
84
78
 
85
- For a new site there are 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.
79
+ For a new site in Wix's editor there are 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.
86
80
 
87
81
  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.
88
82
  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.
@@ -105,6 +99,7 @@ export const toWidget = (text) => Object.values(SITE_CREATION_COPY).reduce((acc,
105
99
  */
106
100
  const EXECUTE_WIX_API_INTRO = dedent `
107
101
  Execute JavaScript code against the Wix REST API when code is useful for chaining related calls, pagination, loops, branching, or in-memory transformation.
102
+ Putting a site live or changing a headless site's files starts with StartDeployWebsite; building a new site in code with StartHeadlessBuild.
108
103
 
109
104
  CODE CONTRACT:
110
105
  - Pass an async function expression: \`async function() { ... }\` or \`async () => { ... }\`. Put every declaration, \`await\`, and \`return\` inside it, and do not invoke it yourself.
@@ -189,7 +184,7 @@ const ACCOUNT_SITE_EXECUTE_SCOPE = dedent `
189
184
  declare const files: Array<{ path: string; content: string; encoding?: "base64" }>;
190
185
  \`\`\`
191
186
 
192
- FILE UPLOADS: files never go inline in \`code\`; two params feed the \`files\` global. \`attachments\` takes files attached in the chat or created in your file sandbox, of any type and size up to 10 MB per call (a zip of a whole site, HTML, images, PDFs): pass the files themselves, all in one call, and the platform resolves each into \`{ download_url, file_id, file_name?, mime_type? }\` — the bytes are fetched for you and arrive as base64 entries named by file name. The \`files\` param takes content you have as text here: text goes raw; a small binary (icon, logo, font) rides as a \`base64\`-tagged entry — large images/video are referenced by URL (\`<img src="https://...">\`), not bundled. \`wix.multipart()\` turns the whole set into one upload body (bytes, so binary is safe):
187
+ FILE UPLOADS: files never go inline in \`code\`; two params feed the \`files\` global. \`attachments\` works in ChatGPT only: pass files attached in the chat or created in your sandbox (any type, up to 10 MB per call: a zip of a whole site, HTML, images, PDFs) as you have them, by file id or /mnt/data path, all in one call. ChatGPT swaps each for \`{ download_url, file_id, file_name?, mime_type? }\` before the call reaches Wix, and the bytes arrive as base64 entries named by file name. Other clients send the value unchanged and the call fails before running; there, leave \`attachments\` out, or upload from your shell if it reaches the internet. The \`files\` param takes content you have as text here: text goes raw; a small binary (icon, logo, font) rides as a \`base64\`-tagged entry — large images/video are referenced by URL (\`<img src="https://...">\`), not bundled. \`wix.multipart()\` turns the whole set into one upload body (bytes, so binary is safe):
193
188
  \`\`\`javascript
194
189
  // files param:
195
190
  // === FILE: index.html ===
@@ -347,7 +342,7 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
347
342
  ReadFullDocsArticle: dedent `
348
343
  Fetches the full Wix docs article or method article with code examples for using the method.
349
344
  Docs articles looks like this: https://dev.wix.com/docs/... and they can either be general docs articles or method articles.
350
- Also reads Wix skills pages — https://www.wix.com/skills/<skill>, https://dev.wix.com/docs/skills/<skill>, and the files they link (e.g. .../<skill>/references/<file>.md) — exactly as served.
345
+ Also reads Wix skills pages — https://www.wix.com/skills/<skill>, https://dev.wix.com/docs/skills/<skill>, and the files they link (e.g. .../<skill>/references/<file>.md) — and Wix Headless agent pages under https://www.wix.com/headless/ (e.g. https://www.wix.com/headless/skill.md), exactly as served.
351
346
  Take the URL from the user's message or an earlier tool result. To reach an article you have no URL for, search or browse the docs first.
352
347
  For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include ?apiView=SDK.
353
348
  ${reminder}
@@ -395,7 +390,7 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
395
390
  ${reminder}
396
391
  `,
397
392
  ManageWixSite: dedent `
398
- Use account level API in order to create a site and update a site.
393
+ Use account level API in order to update a site.
399
394
  Account-level only: this tool acts on the account itself, or on sites as objects within it, and sends no site context. Anything that reads or writes inside a site is site-level and does not belong here — use a site-level tool with that site's \`siteId\`.
400
395
  For POST/PATCH/PUT requests, pass the request body as a JSON object or array in the "body" parameter with all the required fields and values as described in the API schema, code examples, or docs you retrieved (e.g. body: {"name": "value", "nested": {"key": "value"}} or body: [{"key": "value"}]).
401
396
  The API endpoint url param MUST ALWAYS be taken from the conversation context.
@@ -474,14 +469,15 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
474
469
 
475
470
  Do not call this if the user explicitly asks to build with AI; call \`WixSiteBuilder\` instead.
476
471
  Do not call this if the user asks for templates or Wix Studio; call \`SearchSiteTemplates\` instead.
472
+ Not for a site the user wants you to build in code, a design you worked out together, or an app: call \`StartHeadlessBuild\`.
477
473
 
478
474
  When calling this tool, infer \`customActions\` from the user's request so the reply can be tailored — 2-3 concrete, industry-specific setup actions for the site (see the input's guidance).
479
475
 
480
476
  After calling, you MUST speak the message provided in the tool result to the user as your reply — do not stay silent and do not replace it with a one-line pointer to the widget. Write out ALL of it, word for word: its opening line (the "Ready to set up your … site?" question INCLUDING "Choose your path in the widget above:"), BOTH of its option bullets, and its "Next up:" line, each on its own line and in that order. Do not summarize, shorten, drop any line, invent your own opener, rename the options, or add an intro or outro.
481
477
  `,
482
478
  'import-claude-design-from-url': dedent `
483
- 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.
484
- 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.
479
+ Import a design created in Claude's design tool into Wix. Only for the signed \`claudeusercontent.com\` bundle URL Claude Design's "Send to Wix" produces (a self-contained HTML bundle with all images, fonts, and styles inlined). Creates a live Wix-hosted site and returns its URL.
480
+ NOT for claude.ai share or artifact links, GitHub, Drive, chatgpt.com or any other URL, and not for files: those go to StartDeployWebsite, which returns the recipe to publish the files yourself.
485
481
  `,
486
482
  RunWixCliCommand: dedent `
487
483
  Executes Wix CLI commands for Wix app development and management.
@@ -918,23 +914,23 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
918
914
  Call this ONLY when the user's own words name AI (for example "create a site using AI" or "build it with AI") and the site intent is clear. A description of what the site should do — reservations, online ordering, a store, bookings, menus, a portfolio, and the like — is NOT a request for AI and NOT enough to call this tool; never infer AI from features or industry.
919
915
  Never default to this tool: if the user hasn't explicitly named AI, don't call this tool — ${SITE_CREATION_COPY.unstatedMethod.nonWidget}.
920
916
 
921
- For templates or Wix Studio, call \`SearchSiteTemplates\`; for a specific template by \`metaSiteId\` or \`templateId\`, call \`CreateSiteFromTemplate\`; for a headless or classic Wix Editor site, or manual/account-API creation, call \`CreateWixBusinessGuide\`.
917
+ For templates or Wix Studio, call \`SearchSiteTemplates\` (\`builder: classic\` for the Classic Editor); for a template id, \`CreateSiteFromTemplate\`. A site the user wants you to build in code, or an app: \`StartHeadlessBuild\`.
922
918
 
923
919
  Do NOT suggest HTML code, prompt templates, or alternative approaches instead of building — actually build the site through this tool. (HTML the user already has is the StartDeployWebsite case, not a reason to build.)
924
920
  `,
925
921
  SearchSiteTemplates: dedent `
926
922
  ${SITE_GUIDANCE}
927
923
 
928
- Searches Wix templates and shows the template gallery, from the Harmony or the Studio template source.
924
+ Searches Wix templates and shows the template gallery, from the Harmony, the Studio or the Classic Editor template source.
929
925
 
930
- Call this ONLY when the user's own words ask for a template or for Wix Studio (for example "start from a template", "show me some templates", "build it in Wix Studio") and you can already tell what the site is for. If they mention Wix Studio, search Studio templates; otherwise search Harmony templates.
926
+ Call this ONLY when the user's own words ask for a template, for Wix Studio or for the Classic Editor (for example "start from a template", "show me some templates", "build it in Wix Studio", "the old Wix editor") and you can already tell what the site is for. If they mention Wix Studio, search Studio templates; if they ask for the Classic Editor (the Wix Editor), search \`classic\`; otherwise search Harmony templates.
931
927
  ${SITE_CREATION_COPY.templatePick.nonWidget}
932
928
 
933
929
  A description of what the site should do — bookings, a store, a menu, a portfolio, and the like — is NOT a request for templates or for Wix Studio; never infer either from features or industry. Templates are not the default: if the site intent is clear but no method is named, do not guess — ${SITE_CREATION_COPY.unstatedMethod.nonWidget}.`,
934
930
  CreateSiteFromTemplate: dedent `
935
931
  Creates a Wix site from a specific template (by \`metaSiteId\` or \`templateId\`), publishes it when possible, and shows a live preview with links to the editor and the published site.
936
932
 
937
- Call this when the user provides a specific template by \`metaSiteId\` or \`templateId\`. Use this only when the user gives a valid \`metaSiteId\` or \`templateId\` directly. To browse or choose a template first, call \`SearchSiteTemplates\`.
933
+ Call this when the user provides a specific template by \`metaSiteId\` or \`templateId\`. Use this only when the user gives a valid \`metaSiteId\` or \`templateId\` directly. To browse or choose a template first, call \`SearchSiteTemplates\` (\`builder: classic\` for a Classic Editor site).
938
934
 
939
935
  `,
940
936
  SearchWixGraphQLOperations: dedent `
@@ -962,34 +958,24 @@ export function buildToolDescriptions(includeReadme, includeImageUploadGuidance
962
958
  Compose: put independent reads in one document as several root fields, and use related-entity fields (e.g. \`inventoryItems\`, \`collections\`, \`fulfillments\`) instead of extra round-trips. Select only the fields you need; every object field needs a selection set. Variables: use them for \`JSON\` scalars (filter, sort) and plain scalars (String, Int, ID), declared in the document (e.g. \`query Q($f: JSON) { ... filter: $f ... }\`). Write mutation inputs and any object that contains an enum INLINE as GraphQL literals with enum values unquoted (e.g. \`input: { product: { name: "Mug", productType: PHYSICAL } }\`) — this endpoint fails with 503 when an enum value arrives inside an object-typed variable. For lists page with \`cursorPaging\` or \`paging\` exactly as the input type declares (never the other one), and request \`pageInfo { hasNext total }\`; \`total\` is only populated with offset \`paging\`, so for a cursor-paged list count by walking pages or use a count operation.
963
959
  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.
964
960
  Set \`hasMutations: true\` for any document containing a mutation root field.
961
+ `,
962
+ UploadHeadlessWebsiteFiles: dedent `
963
+ The upload step of the StartDeployWebsite and StartHeadlessBuild guides, and nothing else: puts a finished static website's files — index.html plus its CSS/JS/images, a static build, or a zip of the site — onto an existing Wix Headless site by its metaSiteId. Call it ONLY after one of them has returned its guide in this conversation and the site exists: for a new site, first run the recipe's provision call and pass the metaSiteId it returns; for a site deployed earlier, pass its metaSiteId. It does not create sites. Every upload replaces the whole file set and the URL stays. Returns the live URL and the dashboard link, and points back to the recipe for what comes next.
964
+ Pass the files themselves: in ChatGPT as \`attachments\` (any type, a zip is unpacked), elsewhere as the \`files\` text bundle (\`=== FILE: <path> ===\` sections, \`base64\` tag for small binaries). The site must contain index.html at its root.
965
+ NOT a site-creation tool: a request to create, build, design or generate a site — with or without a description — never comes here (those are the site-creation tools, after their own questions). Also NOT for media uploads to an existing site (UploadImageToWixSite) or any other API call (ExecuteWixAPI).
965
966
  `,
966
967
  StartDeployWebsite: dedent `
967
- 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 — or an already-deployed Wix Headless site whose files should be replaced. The site can be 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, update my site, or upload my site / index.html.
968
+ 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 — or an already-deployed Wix Headless site whose files should be replaced. The site can be 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, put online, make it live, get a URL, upload my site / index.html, or wants to update or redeploy the files of a site you or the user deployed as code.
968
969
  Updates keep the same site and URL. Also for implementing a backend on such a site 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.
969
970
  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).
970
- Returns the full recipe; follow it and run the flow yourself. The drop page is only the fallback when you can't.
971
- NOT for: a screenshot, mockup or reference image of a site the user WANTS (nothing exists to deploy yet — that is site creation: WixSiteBuilder / templates); a Claude Design share URL (import-claude-design-from-url); migrating a live site by URL or CSV exports; adding HTML or code into an existing Wix site; uploading images or documents to a site's media (UploadImageToWixSite).
971
+ Returns the full recipe; follow it and run the flow yourself. When the UploadHeadlessWebsiteFiles tool is available, use it for the recipe's upload step — after the site exists (the recipe's provision call, or a metaSiteId from an earlier deploy) — instead of building the multipart body in code; never before this tool. The drop page is only the fallback when you can't.
972
+ NOT for: a screenshot or reference of a site the user wants Wix to generate (the site-creation tools); a site described in words with no code yet (StartHeadlessBuild); a Wix editor site's content or settings (WixSiteBuilder's edit mode, or WixREADME); a Claude Design bundle URL (import-claude-design-from-url); migrating a live site by URL or CSV exports; adding HTML or code into an existing Wix site; uploading images or documents to a site's media (UploadImageToWixSite).
972
973
  `,
973
- CreateWixBusinessGuide: dedent `
974
- Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
975
- 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\`.
976
- 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.
977
-
978
- ## What This Tool Contains
979
-
980
- This tool provides complete documentation including:
981
- - Template selection (empty sites or designed templates)
982
- - Wix Editor vs Wix Studio options
983
- - Regular vs Headless site creation (CLI-based; returns setup instructions)
984
- - API endpoint details and parameters
985
- - Post-creation steps (OAuth for headless, publishing for regular sites)
986
- - App installation instructions
987
-
988
- ## After Reading This Documentation
989
-
990
- **After reading this documentation:**
991
- 1. Use ManageWixSite for account-level site creation API calls
992
- 2. Use CallWixSiteAPI / ExecuteWixAPI for site-level follow-up API calls (like install apps if needed)`
974
+ StartHeadlessBuild: dedent `
975
+ The user wants a site or web app that you build and keep changing in code, here with them, and no code exists yet. Wix runs its business side (store, bookings, CMS, forms, members, payments) as a Wix Headless site. Call this when the user asks you to build it yourself rather than Wix's AI or a template; when the two of you worked out a design in this conversation and nothing is coded yet; when it is an app (a game, a dashboard, a tool); when the user asks for a headless site; when a prompt links \`wix.com/headless/skill.md\` or a project's \`download.zip\`; or to move a Wix site to code.
976
+ Call it right away: it only returns the guide, and the site's purpose is not needed first (pass "not stated yet" for what you don't know). Returns the full guide; follow it and do the work yourself, choosing its route by what you can reach (a shell that reaches Wix, or this MCP alone).
977
+ NOT for: files, a build, a zip or a page that already exist (StartDeployWebsite); a site the user will design in Wix's editor (the site-creation tools); a Claude Design URL (import-claude-design-from-url).
978
+ `
993
979
  };
994
980
  }
995
981
  /**
@@ -1005,9 +991,9 @@ const recipesIndexDoc = {
1005
991
  action: 'include'
1006
992
  };
1007
993
  const README_INTRO = dedent `
1008
- <agent-mandatory-instructions>
994
+ <wix-usage-guide>
1009
995
 
1010
- YOU MUST READ AND FOLLOW THE AGENT-MANDATORY-INSTRUCTIONS BELOW:
996
+ How to work with Wix through these tools:
1011
997
 
1012
998
  <source-of-truth>
1013
999
  Do not answer from memory about anything Wix-specific — this covers every part of your answer, not only API calls: any URL, link, ID, setting location, or product fact you give the user must come from the docs tools, the recipes below, a previous tool result in this conversation, or the user's own message (identifiers and URLs the user supplies are fine to use as given). If a recipe in the index below matches what the user asked for, read it before answering. For APIs, use the search, browse, read-docs, and schema tools as the source of truth for the exact URL, HTTP method, request body shape, response shape, field names, required fields, and enum values before calling an API.
@@ -1059,7 +1045,7 @@ const README_BODY = dedent `
1059
1045
  <other-uses>
1060
1046
  Beyond managing user sites, the Wix MCP tools can be used for any other purpose they support — for example, reading Wix SDK docs to write code against the SDK, using the Wix CLI to create apps, answering documentation questions, and so on.
1061
1047
  </other-uses>
1062
- </agent-mandatory-instructions>
1048
+ </wix-usage-guide>
1063
1049
  `;
1064
1050
  /**
1065
1051
  * Default readme docs - content for WixREADME tool response.
@@ -1136,8 +1122,7 @@ export const widgetSiteCreationConfig = {
1136
1122
  'WixSiteBuilder',
1137
1123
  'WixSiteCreation',
1138
1124
  'SearchSiteTemplates',
1139
- 'CreateSiteFromTemplate',
1140
- 'CreateWixBusinessGuide'
1125
+ 'CreateSiteFromTemplate'
1141
1126
  ].map((tool) => [tool, toWidget(defaultToolDescriptions[tool])]))
1142
1127
  };
1143
1128
  //# sourceMappingURL=default-config.js.map
@@ -108,7 +108,7 @@ export const paramDescriptions = {
108
108
  ReadFullDocsArticle: {
109
109
  articleUrl: 'The URL of the docs article or method article to fetch. Should be something like https://dev.wix.com/docs/.../...' +
110
110
  ' For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include the query param ?apiView=SDK (e.g. https://dev.wix.com/docs/...?apiView=SDK).' +
111
- ' Wix skills pages (https://www.wix.com/skills/..., https://dev.wix.com/docs/skills/...) are read as-is, including their referenced files.'
111
+ ' Wix skills pages (https://www.wix.com/skills/..., https://dev.wix.com/docs/skills/...) and Wix Headless agent pages (https://www.wix.com/headless/..., e.g. https://www.wix.com/headless/skill.md) are read as-is, including their referenced files.'
112
112
  },
113
113
  ReadFullDocsMethodSchema: {
114
114
  articleUrl: 'The URL of the documentation to fetch. Should be something like https://dev.wix.com/docs/.../...' +
@@ -149,7 +149,7 @@ export const paramDescriptions = {
149
149
  operationName: 'Operation to run when the document defines more than one named operation.',
150
150
  siteId: 'The Wix site to run against. Required for site-level operations (anything reading or writing inside a site — products, orders, contacts, bookings, CMS, blog, members ...). Resolve it with GetSiteContext or ListWixSites; never pass a guessed value.',
151
151
  scope: '"site" (default when siteId is given) runs with a site-scoped credential; "account" runs account-level operations (sites, account settings) and ignores siteId.',
152
- hasMutations: 'Whether this document creates, updates, deletes or otherwise mutates Wix data. True for any mutation root field (in any operation of the document) even when the intent is inspection; false only for pure queries. This flag alone decides whether a transient server error may be retried, so never mark a document that writes as false.',
152
+ hasMutations: 'True if the document contains a mutation root field in any of its operations; false if it contains only queries. A transient server error is retried only when this is false.',
153
153
  reason: 'One sentence explaining the original user request and why you are running this GraphQL operation to complete it.'
154
154
  },
155
155
  RunWixCliCommand: {
@@ -18,9 +18,12 @@ export interface ReadmeDocConfig {
18
18
  }
19
19
  export interface DocsToolsOptions {
20
20
  getToKnowWixEnabled?: boolean;
21
+ /** @deprecated CreateWixBusinessGuide was removed (StartHeadlessBuild replaces its headless route); ignored. */
21
22
  createWixBusinessGuideEnabled?: boolean;
22
23
  /** StartDeployWebsite (publish ready-made site files) — an account-owner flow; off for visitor servers. */
23
24
  startDeployWebsiteEnabled?: boolean;
25
+ /** StartHeadlessBuild (build a new site in code) — an account-owner flow; off for visitor servers. */
26
+ startHeadlessBuildEnabled?: boolean;
24
27
  disableTools?: string[];
25
28
  /** Custom descriptions for tools, keyed by tool name */
26
29
  toolDescriptions?: Record<string, string>;
@@ -44,8 +47,7 @@ export interface DocsToolsOptions {
44
47
  dynamicContextEnabled?: boolean;
45
48
  /** Enable partner context section in dynamic context output */
46
49
  partnerContextEnabled?: boolean;
47
- /** Whether the client is a CLI environment (e.g. Claude Code) where users can run terminal commands.
48
- * Accepts a boolean or a function for lazy evaluation (useful when client name is only known after MCP init). */
50
+ /** @deprecated Only CreateWixBusinessGuide read it, and that tool was removed; ignored. */
49
51
  cliEnabled?: boolean | (() => boolean);
50
52
  /** Use the new platformized semantic search API (POST /v1/docs/search) instead of the legacy GET endpoint */
51
53
  usePlatformizedSearch?: boolean;
@@ -7,7 +7,7 @@ import { normalizeMenuContent, summarizeLargeMenu, fetchMenuContent, MENU_CONTEN
7
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
- import { addCreateWixBusinessGuideTools } from './create-site-guide.js';
10
+ import { addStartHeadlessBuildTool } from './start-headless-build.js';
11
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';
@@ -68,7 +68,7 @@ export const addDocsTools = (server, allowedTools = [
68
68
  'CLI',
69
69
  'OVERVIEW'
70
70
  ], options = {}) => {
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;
71
+ const { getToKnowWixEnabled = false, startDeployWebsiteEnabled = true, startHeadlessBuildEnabled = true, disableTools, toolDescriptions, readmeDocs, authStrategy, skillsPortalUrl, skillsRepo, repo, skillsPr, commitHash, skillsTags, dynamicContextEnabled, 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)
@@ -120,10 +120,6 @@ export const addDocsTools = (server, allowedTools = [
120
120
  skillsTags
121
121
  });
122
122
  }
123
- if (createWixBusinessGuideEnabled &&
124
- !disableTools?.includes('CreateWixBusinessGuide')) {
125
- addCreateWixBusinessGuideTools(server, disableTools || [], toolDescriptions, cliEnabled);
126
- }
127
123
  // On by default: it is a routing slot, not a docs source — the agent with
128
124
  // ready-made site files must find it next to the site-creation tools.
129
125
  if (startDeployWebsiteEnabled) {
@@ -133,6 +129,14 @@ export const addDocsTools = (server, allowedTools = [
133
129
  commitHash: effectiveCommitHash
134
130
  });
135
131
  }
132
+ // Same reach as StartDeployWebsite: the slot for a site built in code with no code yet.
133
+ if (startHeadlessBuildEnabled) {
134
+ addStartHeadlessBuildTool(server, disableTools || [], toolDescriptions, {
135
+ skillsPortalUrl,
136
+ repo: effectiveRepo,
137
+ commitHash: effectiveCommitHash
138
+ });
139
+ }
136
140
  // WDS Documentation
137
141
  if (allowedTools.includes('WDS') &&
138
142
  !disableTools?.includes('SearchWixWDSDocumentation')) {
@@ -651,7 +655,7 @@ export const addDocsTools = (server, allowedTools = [
651
655
  content: [
652
656
  {
653
657
  type: 'text',
654
- text: `Invalid article URL: must start with https://dev.wix.com/docs/, or be a Wix skills page (https://www.wix.com/skills/...). Got: "${articleUrl}"`
658
+ text: `Invalid article URL: must start with https://dev.wix.com/docs/, or be a Wix skills page (https://www.wix.com/skills/..., https://www.wix.com/headless/...). Got: "${articleUrl}"`
655
659
  }
656
660
  ]
657
661
  };
@@ -57,7 +57,10 @@ const DOCS_URL_PREFIX = 'https://dev.wix.com/docs/';
57
57
  * get-article-content API does not know them, and `.md` is a real path, so
58
58
  * they are fetched as-is.
59
59
  */
60
- const SKILLS_REGISTRY_URL = new RegExp('^https://(?:dev\\.wix\\.com(?:/docs)?|www\\.wix\\.com(?:/velo/reference)?)/skills(?:[/.?#]|$)');
60
+ const SKILLS_REGISTRY_URL = new RegExp('^https://(?:dev\\.wix\\.com(?:/docs)?|www\\.wix\\.com(?:/velo/reference)?)/skills(?:[/.?#]|$)' +
61
+ // Anything under www.wix.com/headless/ (e.g. the landing page's skill.md) is
62
+ // served as raw markdown like the registry, and read the same way.
63
+ '|^https://www\\.wix\\.com/headless/');
61
64
  export function isSkillsRegistryUrl(url) {
62
65
  return SKILLS_REGISTRY_URL.test(url.trim());
63
66
  }
@@ -66,7 +66,7 @@ export async function addGetToKnowTools({ server, disableTools = [], toolDescrip
66
66
  return;
67
67
  }
68
68
  // Use provided docs or fall back to defaults. The Recipes block is appended
69
- // at the end so the hand-authored agent-mandatory-instructions stay on top.
69
+ // at the end so the hand-authored wix-usage-guide stays on top.
70
70
  const baseDocs = readmeDocs ?? defaultReadmeDocs;
71
71
  const baseDocsWithoutRecipes = baseDocs.filter((doc) => doc.url !== RECIPES_INDEX_URL);
72
72
  server.tool('WixREADME', toolDescriptions?.['WixREADME'] ?? defaultToolDescriptions.WixREADME, {}, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (args, { httpClient }) => {
@@ -0,0 +1,19 @@
1
+ import { WixMcpServer } from '../wix-mcp-server.js';
2
+ import { type StartDeployWebsiteFetchOptions } from './start-deploy-website.js';
3
+ export declare const START_HEADLESS_BUILD_TOOL_NAME = "StartHeadlessBuild";
4
+ /** Wix's headless guide; identical to https://www.wix.com/headless/skill.md. */
5
+ export declare const HEADLESS_GUIDE_URL = "https://www.wix.com/skills/headless-cold-start/headless-kit.md";
6
+ export declare const START_HEADLESS_BUILD_STARTING_POINTS: readonly ["nothing yet", "a design worked out in this conversation", "an existing Wix Headless site", "a project download link", "a Wix site to move to code"];
7
+ type StartingPoint = (typeof START_HEADLESS_BUILD_STARTING_POINTS)[number];
8
+ export declare const START_HEADLESS_BUILD_PARAM_DESCRIPTIONS: {
9
+ readonly userRequest: "The user's request that led here, quoted if short, otherwise summarized in a sentence.";
10
+ readonly siteDescription: "What the site is: its purpose and who it is for. One or two sentences.";
11
+ readonly startingPoint: "What the build starts from: nothing yet; a design worked out in this conversation; an existing Wix Headless site; a project download link (a download.zip from Wix); or a Wix site to move to code.";
12
+ readonly siteFunctionality: "What the site must be able to do for its visitors beyond showing pages, if anything (for example 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), in your own words. If it is a plain static site with no such needs, say so.";
13
+ readonly agentIdentity: "Which agent or product you are and the harness you run in.";
14
+ readonly wixAccess: "How you can reach Wix from where you run: through this MCP only, or also from a shell whose network can reach wixapis.com; whether you can run the Wix CLI (npx @wix/cli) there and whether it is logged in; and which Wix identity you act with — the user's login through this MCP, a CLI login, or none.";
15
+ };
16
+ export declare function startHeadlessBuildResponse(guide: string | undefined, startingPoint: StartingPoint): string;
17
+ export declare function addStartHeadlessBuildTool(server: WixMcpServer, disableTools?: string[], toolDescriptions?: Record<string, string>, fetchOptions?: StartDeployWebsiteFetchOptions): void;
18
+ export {};
19
+ //# sourceMappingURL=start-headless-build.d.ts.map
@@ -0,0 +1,74 @@
1
+ import { z } from 'zod';
2
+ import { defaultToolDescriptions } from '../config/default-config.js';
3
+ import { fetchArticleContent } from './fetch-article.js';
4
+ import { START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS } from './start-deploy-website.js';
5
+ export const START_HEADLESS_BUILD_TOOL_NAME = 'StartHeadlessBuild';
6
+ /** Wix's headless guide; identical to https://www.wix.com/headless/skill.md. */
7
+ export const HEADLESS_GUIDE_URL = 'https://www.wix.com/skills/headless-cold-start/headless-kit.md';
8
+ export const START_HEADLESS_BUILD_STARTING_POINTS = [
9
+ 'nothing yet',
10
+ 'a design worked out in this conversation',
11
+ 'an existing Wix Headless site',
12
+ 'a project download link',
13
+ 'a Wix site to move to code'
14
+ ];
15
+ // Like StartDeployWebsite's, these arguments are read by people via BI; only
16
+ // `startingPoint` changes the response.
17
+ export const START_HEADLESS_BUILD_PARAM_DESCRIPTIONS = {
18
+ userRequest: START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.userRequest,
19
+ siteDescription: START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.siteDescription,
20
+ startingPoint: 'What the build starts from: nothing yet; a design worked out in this conversation; an existing Wix Headless site; a project download link (a download.zip from Wix); or a Wix site to move to code.',
21
+ siteFunctionality: START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.siteFunctionality,
22
+ agentIdentity: START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.agentIdentity,
23
+ wixAccess: START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.wixAccess
24
+ };
25
+ const PREFIX = "The following is Wix's headless guide. Follow it end to end and do the work yourself. If you find the user already has the site's code, call StartDeployWebsite instead.";
26
+ const MOVE_TO_CODE_LINE = 'Moving a Wix site to code starts from the site\'s dashboard (Headless settings, "Go Headless"), which hands the owner a prompt with the project\'s download link. Ask the user for that prompt, then follow the guide with it.';
27
+ export function startHeadlessBuildResponse(guide, startingPoint) {
28
+ const lines = [];
29
+ if (startingPoint === 'a Wix site to move to code') {
30
+ lines.push(MOVE_TO_CODE_LINE);
31
+ }
32
+ if (guide && guide.trim()) {
33
+ lines.push(PREFIX, '---', guide.trim());
34
+ }
35
+ else {
36
+ lines.push(`Wix's headless guide could not be loaded here. It is at ${HEADLESS_GUIDE_URL}: read it whole with ReadFullDocsArticle if you have that tool, otherwise fetch it with curl or your web tool, then follow it end to end and do the work yourself. If you find the user already has the site's code, call StartDeployWebsite instead.`);
37
+ }
38
+ return lines.join('\n\n');
39
+ }
40
+ export function addStartHeadlessBuildTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
41
+ if (disableTools.includes(START_HEADLESS_BUILD_TOOL_NAME)) {
42
+ return;
43
+ }
44
+ const d = START_HEADLESS_BUILD_PARAM_DESCRIPTIONS;
45
+ server.tool(START_HEADLESS_BUILD_TOOL_NAME, toolDescriptions?.[START_HEADLESS_BUILD_TOOL_NAME] ??
46
+ defaultToolDescriptions[START_HEADLESS_BUILD_TOOL_NAME], {
47
+ userRequest: z.string().min(1).describe(d.userRequest),
48
+ siteDescription: z.string().min(1).describe(d.siteDescription),
49
+ startingPoint: z
50
+ .enum(START_HEADLESS_BUILD_STARTING_POINTS)
51
+ .describe(d.startingPoint),
52
+ siteFunctionality: z.string().min(1).describe(d.siteFunctionality),
53
+ agentIdentity: z.string().min(1).describe(d.agentIdentity),
54
+ wixAccess: z.string().min(1).describe(d.wixAccess)
55
+ }, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (args, { httpClient }) => {
56
+ // Inline, not a link: chat agents cannot fetch www.wix.com themselves.
57
+ let guide;
58
+ try {
59
+ guide = await fetchArticleContent(httpClient, HEADLESS_GUIDE_URL, 'article', true, fetchOptions.skillsPortalUrl, fetchOptions.repo, fetchOptions.commitHash);
60
+ }
61
+ catch (error) {
62
+ console.warn('[StartHeadlessBuild] guide fetch failed, returning the pointer:', error instanceof Error ? error.message : error);
63
+ }
64
+ return {
65
+ content: [
66
+ {
67
+ type: 'text',
68
+ text: startHeadlessBuildResponse(guide, args.startingPoint)
69
+ }
70
+ ]
71
+ };
72
+ });
73
+ }
74
+ //# sourceMappingURL=start-headless-build.js.map
@@ -163,7 +163,9 @@ function addExecuteGraphqlTool(server, description, authStrategy, options) {
163
163
  scope: z.enum(['site', 'account']).optional().describe(d.scope),
164
164
  hasMutations: z.boolean().describe(d.hasMutations),
165
165
  reason: z.string().describe(d.reason)
166
- }, { readOnlyHint: false, destructiveHint: true, openWorldHint: false }, async ({ query, variables, operationName, siteId, scope, hasMutations, reason }, extra) => {
166
+ },
167
+ // openWorldHint true: any operation in the Wix GraphQL schema, chosen at call time.
168
+ { readOnlyHint: false, destructiveHint: true, openWorldHint: true }, async ({ query, variables, operationName, siteId, scope, hasMutations, reason }, extra) => {
167
169
  const effectiveScope = scope ?? (siteId ? 'site' : 'account');
168
170
  logger.log(`[${EXECUTE_GRAPHQL_TOOL_NAME}] scope=${effectiveScope} siteId=${siteId ?? 'none'} hasMutations=${hasMutations} operationName=${operationName ?? '-'} reason="${reason}"`);
169
171
  if (effectiveScope === 'site' && !siteId) {
@@ -125,11 +125,11 @@ export function addImportClaudeDesignTool(server, authStrategy, options) {
125
125
  }
126
126
  const contentLength = Number(response.headers.get('content-length'));
127
127
  if (contentLength > maxBundleBytes) {
128
- return errorResult('The design is too large to import.');
128
+ return errorResult("The design is too large to import. This tool only takes Claude Design's bundle URL. To put this site live, call StartDeployWebsite with the site's files.");
129
129
  }
130
130
  const html = await readBodyWithLimit(response, maxBundleBytes);
131
131
  if (html === null) {
132
- return errorResult('The design is too large to import.');
132
+ return errorResult("The design is too large to import. This tool only takes Claude Design's bundle URL. To put this site live, call StartDeployWebsite with the site's files.");
133
133
  }
134
134
  try {
135
135
  const { id, outcome } = await initInstantSite(wixstroOptions, args.title, args.claude_design_project_id, INSTANT_SITE_ORIGIN);
@@ -22,6 +22,7 @@ export { createWixToolkit, extractText, type WixTool, type WixToolkit, type WixT
22
22
  export { fetchRecipesIndex, fetchArticle, RECIPES_INDEX_URL } from './docs/fetch-article.js';
23
23
  export { generateDocsNavigationTree, fetchMenuContent, MENU_CONTENT_THRESHOLD, normalizeMenuContent, summarizeLargeMenu, parseDirectChildren } from './docs/normalize-menu-content.js';
24
24
  export { addCodeModeTools, addExecuteCodeModeTool, addSearchCodeModeTool, type CodeModeFetch, type CodeModeOptions } from './code-mode/index.js';
25
+ export { addUploadHeadlessWebsiteFilesTool, UPLOAD_HEADLESS_WEBSITE_FILES_TOOL_NAME } from './api-call/upload-headless-website-files.js';
25
26
  export { validateExecuteCode, EXECUTE_FUNCTION_EXPRESSION_HINT, type CodeValidationResult } from './code-mode/validation.js';
26
27
  export { addGraphqlTools, resetGraphqlSchemaCache, GRAPHQL_TOOL_NAMES, SEARCH_GRAPHQL_TOOL_NAME, INSPECT_GRAPHQL_TOOL_NAME, EXECUTE_GRAPHQL_TOOL_NAME, WIX_GRAPHQL_ENDPOINT, type GraphqlToolsOptions, type GraphqlToolName } from './graphql/index.js';
27
28
  export { defaultConfig, defaultToolDescriptions, defaultReadmeDocs, widgetSiteCreationConfig, SITE_CREATION_COPY, toWidget, executeCodeModeToolDescriptions, SYSTEM_REMINDER_GUIDELINES, SYSTEM_REMINDER, mergeConfig, type ModeDefaultConfig } from './config/default-config.js';
@@ -26,6 +26,7 @@ export { fetchRecipesIndex, fetchArticle, RECIPES_INDEX_URL } from './docs/fetch
26
26
  export { generateDocsNavigationTree, fetchMenuContent, MENU_CONTENT_THRESHOLD, normalizeMenuContent, summarizeLargeMenu, parseDirectChildren } from './docs/normalize-menu-content.js';
27
27
  // Code mode (search + execute via sandboxed JS)
28
28
  export { addCodeModeTools, addExecuteCodeModeTool, addSearchCodeModeTool } from './code-mode/index.js';
29
+ export { addUploadHeadlessWebsiteFilesTool, UPLOAD_HEADLESS_WEBSITE_FILES_TOOL_NAME } from './api-call/upload-headless-website-files.js';
29
30
  export { validateExecuteCode, EXECUTE_FUNCTION_EXPRESSION_HINT } from './code-mode/validation.js';
30
31
  // GraphQL tools (search operations + inspect schema + execute)
31
32
  export { addGraphqlTools, resetGraphqlSchemaCache, GRAPHQL_TOOL_NAMES, SEARCH_GRAPHQL_TOOL_NAME, INSPECT_GRAPHQL_TOOL_NAME, EXECUTE_GRAPHQL_TOOL_NAME, WIX_GRAPHQL_ENDPOINT } from './graphql/index.js';
@@ -21,7 +21,8 @@ const BLANK_CANVAS_IMAGE_URL = 'https://images-wixmp-530a50041672c69d335ba4cf.wi
21
21
  const BLANK_CANVAS_DESCRIPTION = 'This Blank Canvas Responsive Template is ready to be customized to your exact needs.';
22
22
  const BLANK_CANVAS_META_SITE_ID = {
23
23
  studio: 'fe86a14e-ef67-49b4-a409-d086f3abaa1a',
24
- harmony: '91532250-8835-46ac-9666-e4db8770b275'
24
+ harmony: '91532250-8835-46ac-9666-e4db8770b275',
25
+ classic: 'b55bdf43-95e0-4cef-b9bb-92dcc7af2742'
25
26
  };
26
27
  /**
27
28
  * Searches Wix templates server-side. Widget clients render a gallery to pick from
@@ -55,9 +56,9 @@ export function addSearchSiteTemplatesTool(server, _authStrategy, options) {
55
56
  defaultToolDescriptions[SEARCH_SITE_TEMPLATES_TOOL_NAME],
56
57
  inputSchema: {
57
58
  builder: z
58
- .enum(['harmony', 'studio'])
59
+ .enum(['harmony', 'studio', 'classic'])
59
60
  .default('harmony')
60
- .describe('Which builder\'s templates to return: "studio" if the user asked for Wix Studio in this site creation flow, otherwise "harmony" (the default). You choose this from the request — don\'t ask the user which builder.'),
61
+ .describe('Which builder\'s templates to return: "studio" if the user asked for Wix Studio in this site creation flow, "classic" if they asked for the Classic Editor (the Wix Editor), otherwise "harmony" (the default). You choose this from the request — don\'t ask the user which builder.'),
61
62
  query: z
62
63
  .string()
63
64
  .min(1)
@@ -185,10 +186,19 @@ function blankCanvasCard(builder) {
185
186
  };
186
187
  }
187
188
  async function searchSiteTemplates(builder, query, limit) {
188
- // Studio is selected via bookType; Harmony via the templateBuilders filter.
189
- const builderParams = builder === 'harmony'
190
- ? { filter: { templateBuilders: [TemplateBuilder.Harmony] } }
191
- : { bookType: 'studio' };
189
+ // Studio is selected via bookType; Harmony and the Classic Editor via the
190
+ // templateBuilders filter (bookType "main-v2" now returns Harmony templates).
191
+ const builderParams = builder === 'studio'
192
+ ? { bookType: 'studio' }
193
+ : {
194
+ filter: {
195
+ templateBuilders: [
196
+ builder === 'classic'
197
+ ? TemplateBuilder.Editor
198
+ : TemplateBuilder.Harmony
199
+ ]
200
+ }
201
+ };
192
202
  const response = await httpClient.request(searchTemplates({
193
203
  language: 'en',
194
204
  query: query.trim(),
@@ -126,9 +126,12 @@ export interface ReadmeDocConfig {
126
126
  }
127
127
  export interface DocsToolsOptions {
128
128
  getToKnowWixEnabled?: boolean;
129
+ /** @deprecated CreateWixBusinessGuide was removed (StartHeadlessBuild replaces its headless route); ignored. */
129
130
  createWixBusinessGuideEnabled?: boolean;
130
131
  /** StartDeployWebsite (publish ready-made site files) — an account-owner flow; off for visitor servers. */
131
132
  startDeployWebsiteEnabled?: boolean;
133
+ /** StartHeadlessBuild (build a new site in code) — an account-owner flow; off for visitor servers. */
134
+ startHeadlessBuildEnabled?: boolean;
132
135
  disableTools?: string[];
133
136
  /** Custom descriptions for tools, keyed by tool name */
134
137
  toolDescriptions?: Record<string, string>;
@@ -152,8 +155,7 @@ export interface DocsToolsOptions {
152
155
  dynamicContextEnabled?: boolean;
153
156
  /** Enable partner context section in dynamic context output */
154
157
  partnerContextEnabled?: boolean;
155
- /** Whether the client is a CLI environment (e.g. Claude Code) where users can run terminal commands.
156
- * Accepts a boolean or a function for lazy evaluation (useful when client name is only known after MCP init). */
158
+ /** @deprecated Only CreateWixBusinessGuide read it, and that tool was removed; ignored. */
157
159
  cliEnabled?: boolean | (() => boolean);
158
160
  /** Use the new platformized semantic search API (POST /v1/docs/search) instead of the legacy GET endpoint */
159
161
  usePlatformizedSearch?: boolean;