@wix/mcp 1.0.91 → 1.0.93

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.
@@ -71098,9 +71098,12 @@ var runSemanticSearch = async (toolName, toolParams, maxResults = 20, rerank = f
71098
71098
  );
71099
71099
  return data?.results;
71100
71100
  };
71101
- var runPlatformizedSemanticSearch = async (toolName, searchTerm, maxResults = 20, linesInEachResult) => {
71101
+ var runPlatformizedSemanticSearch = async (toolName, searchTerm, maxResults = 20, linesInEachResult, extraDocumentTypes) => {
71102
71102
  const startTime = Date.now();
71103
- logger2.log(`[SemanticSearch/v2] Tool: ${toolName}, Query: "${searchTerm}"`);
71103
+ const documentTypes = extraDocumentTypes?.length ? [toolName, ...extraDocumentTypes] : void 0;
71104
+ logger2.log(
71105
+ `[SemanticSearch/v2] Tool: ${documentTypes ? documentTypes.join("+") : toolName}, Query: "${searchTerm}"`
71106
+ );
71104
71107
  const response = await fetch(
71105
71108
  "https://www.wixapis.com/mcp-docs-search/v1/docs/search/markdown",
71106
71109
  {
@@ -71111,7 +71114,7 @@ var runPlatformizedSemanticSearch = async (toolName, searchTerm, maxResults = 20
71111
71114
  },
71112
71115
  body: JSON.stringify({
71113
71116
  search_term: searchTerm,
71114
- document_type: toolName,
71117
+ ...documentTypes ? { document_types: documentTypes } : { document_type: toolName },
71115
71118
  maximum_results: maxResults,
71116
71119
  lines_in_each_result: linesInEachResult
71117
71120
  })
@@ -71140,14 +71143,16 @@ var runSemanticSearchAndFormat = async ({
71140
71143
  maxResults = DEFAULT_MAX_RESULTS,
71141
71144
  rerank,
71142
71145
  linesInEachResult,
71143
- usePlatformizedSearch = true
71146
+ usePlatformizedSearch = true,
71147
+ extraDocumentTypes
71144
71148
  }) => {
71145
71149
  if (usePlatformizedSearch) {
71146
71150
  return runPlatformizedSemanticSearch(
71147
71151
  toolName,
71148
71152
  toolParams.searchTerm,
71149
71153
  maxResults,
71150
- linesInEachResult
71154
+ linesInEachResult,
71155
+ extraDocumentTypes
71151
71156
  );
71152
71157
  } else {
71153
71158
  const results = await runSemanticSearch(
@@ -71679,9 +71684,11 @@ var SITE_CREATION_COPY = {
71679
71684
  }
71680
71685
  };
71681
71686
  var SITE_GUIDANCE = dedent_default`
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.
71687
+ First decide which of two different things is being asked for:
71688
+ - 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.
71689
+ - 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.
71683
71690
 
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).
71691
+ 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.
71685
71692
 
71686
71693
  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
71694
  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.
@@ -71778,13 +71785,14 @@ var ACCOUNT_SITE_EXECUTE_SCOPE = dedent_default`
71778
71785
  unzip(input: string | Uint8Array): Promise<Array<{ path: string; bytes: Uint8Array; text(): string }>>;
71779
71786
  };
71780
71787
  declare const siteId: string | undefined;
71781
- // Files from the ExecuteWixAPI \`files\` param. Text entries have \`content\`;
71782
- // an entry tagged \`=== FILE: <path> base64 ===\` has encoding:'base64' and
71783
- // base64 \`content\` (a binary file — image, font).
71788
+ // Files from the ExecuteWixAPI \`files\` param, followed by the resolved
71789
+ // \`attachments\`. Text entries have \`content\`; an entry tagged
71790
+ // \`=== FILE: <path> base64 ===\` — and every attachment, path = its file name —
71791
+ // has encoding:'base64' and base64 \`content\`.
71784
71792
  declare const files: Array<{ path: string; content: string; encoding?: "base64" }>;
71785
71793
  \`\`\`
71786
71794
 
71787
- FILE UPLOADS: put every file in the \`files\` param (never inline in \`code\`). 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):
71795
+ 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):
71788
71796
  \`\`\`javascript
71789
71797
  // files param:
71790
71798
  // === FILE: index.html ===
@@ -71799,6 +71807,12 @@ var ACCOUNT_SITE_EXECUTE_SCOPE = dedent_default`
71799
71807
  return res.data;
71800
71808
  }
71801
71809
  \`\`\`
71810
+ A site zip passed through \`attachments\` is one base64 entry; unzip it and upload the entries:
71811
+ \`\`\`javascript
71812
+ // attachments: [site.zip] → files = [{ path: "site.zip", content: "<base64>", encoding: "base64" }]
71813
+ const entries = await wix.unzip(files[0].content); // [{ path, bytes, text() }]
71814
+ const mp = wix.multipart(entries);
71815
+ \`\`\`
71802
71816
  DOWNLOAD + EDIT + RE-UPLOAD: fetch the zip as base64, \`wix.unzip()\` it, edit text via \`entry.text()\`, keep binary as bytes, and hand the entries back to \`wix.multipart()\`:
71803
71817
  \`\`\`javascript
71804
71818
  const r = await wix.request({ scope: "account", method: "GET", responseType: "base64", url: zipUrl });
@@ -72003,12 +72017,12 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72003
72017
  NEVER call this tool with a missing, empty, or guessed siteId — ask first instead.
72004
72018
 
72005
72019
  Parameters — provide image input via image and/or imageUrls, OR imageBase64:
72006
- • image (array): chat file ATTACHMENTS. Each item is an object with download_url and file_id (both required), plus optional file_name and mime_type. Pass ALL attachments in one call.
72020
+ • image (array): chat file ATTACHMENTS — files the user attached, or files you created in your own file sandbox. Each item is an object with download_url and file_id (both required), plus optional file_name and mime_type. Pass ALL attachments in one call.
72007
72021
  • imageUrls (array): plain public image URLs the user pasted or other tools produced (no file_id). Pass ALL URLs in one call. Can be combined with image.
72008
72022
  • imageBase64 (string): base64-encoded image + mimeType. One image at a time. Do NOT combine with image/imageUrls.
72009
72023
 
72010
72024
  Delivering the bytes — this is where uploads most often fail:
72011
- • NEVER pass a local or sandbox file path (e.g. /mnt/..., /home/user/..., /Users/...) in any field — the server cannot reach your filesystem. Use a public http(s) URL (imageUrls) or the complete base64 (imageBase64).
72025
+ • Pass a file as a file, in image: the platform resolves it into download_url and file_id before it reaches this tool — this includes files you created in your sandbox. This server does not share your filesystem, so a bare path string (e.g. /mnt/..., /home/user/..., /Users/...) is not a file. Without a file to pass, use a public http(s) URL (imageUrls) or the complete base64 (imageBase64).
72012
72026
  • imageBase64 must be the WHOLE file, not truncated. For large images prefer imageUrls, since long base64 is easily cut off and will be rejected as unreadable.
72013
72027
  `,
72014
72028
  SupportAndFeedback: dedent_default`
@@ -72505,14 +72519,14 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72505
72519
  WixSiteBuilder: dedent_default`
72506
72520
  ${SITE_GUIDANCE}
72507
72521
 
72508
- Tool for generating a Wix site with AI (creating / building a site in Wix Harmony).
72522
+ Tool for generating a Wix site with AI (creating / building a site in Wix Harmony) from a description. It does not take pages or files you already have — those go to StartDeployWebsite.
72509
72523
 
72510
72524
  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.
72511
72525
  Never default to this tool: if the user hasn't explicitly named AI, don't call this tool — ${SITE_CREATION_COPY.unstatedMethod.nonWidget}.
72512
72526
 
72513
72527
  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\`.
72514
72528
 
72515
- Do NOT suggest HTML code, prompt templates, or alternative approaches — actually build the site through this tool.
72529
+ 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.)
72516
72530
  `,
72517
72531
  SearchSiteTemplates: dedent_default`
72518
72532
  ${SITE_GUIDANCE}
@@ -72556,8 +72570,8 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72556
72570
  Set \`hasMutations: true\` for any document containing a mutation root field.
72557
72571
  `,
72558
72572
  StartDeployWebsite: dedent_default`
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
- 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.
72573
+ 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.
72574
+ 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.
72561
72575
  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).
72562
72576
  Returns the full recipe; follow it and run the flow yourself. The drop page is only the fallback when you can't.
72563
72577
  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).
@@ -73222,7 +73236,7 @@ var paramDescriptions = {
73222
73236
  },
73223
73237
  SearchWixRESTDocumentation: {
73224
73238
  searchTerm: `The search term to look up in the Wix REST API Documentation \u2014 a natural-language description of the endpoint, resource, or action you need across any Wix domain (Stores, eCommerce, Bookings, CRM, Members, CMS, Events, Blog, Forms, Media, site settings, etc.), e.g. "create a catalog item with inventory", "book a service", "update data collection items". Match the wording to how many entities you will act on: a plural term ("update products") surfaces the resource's bulk methods, which a singular term ("update a product") ranks lower or leaves out. Results are ranked by relevance, so describe the goal rather than guessing an exact API name.`,
73225
- maxResults: "The maximum number of results to return, default is 10, max is 15",
73239
+ maxResults: "The maximum number of results to return (1\u201317, default 17). Results mix REST API documentation with matching recipes and skills.",
73226
73240
  reason: "One sentence describing the original user request and the task you are trying to accomplish with this search."
73227
73241
  },
73228
73242
  WixBusinessFlowsDocumentation: {
@@ -73243,7 +73257,7 @@ var paramDescriptions = {
73243
73257
  },
73244
73258
  SearchWixHeadlessDocumentation: {
73245
73259
  searchTerm: "The search term to search for in the Headless Documentation",
73246
- maxResults: "The maximum number of results to return, default is 10, max is 15"
73260
+ maxResults: "The maximum number of results to return (1\u201317, default 17). Results mix Headless documentation with matching recipes and skills."
73247
73261
  },
73248
73262
  SearchWixVeloDocumentation: {
73249
73263
  searchTerm: "The search term to search for in the Velo Documentation",
@@ -73271,7 +73285,7 @@ var paramDescriptions = {
73271
73285
  },
73272
73286
  UploadImageToWixSite: {
73273
73287
  siteId: "The ID (UUID) of the Wix site to upload to. REQUIRED. If the user has not clearly specified which site, ASK them which site to upload to (or use ListWixSites to help them pick) BEFORE calling this tool. NEVER call this tool with a missing, empty, placeholder, or guessed siteId \u2014 ask first instead.",
73274
- image: "Array of file ATTACHMENTS the user uploaded in the chat. Each item requires download_url and file_id, and may optionally include file_name and mime_type \u2014 attached files are automatically resolved to these fields by the platform, so just include them here. For plain image URLs the user pasted, use imageUrls instead. ALWAYS pass ALL attachments together in a single call \u2014 NEVER call this tool once per image. Do NOT use together with imageBase64.",
73288
+ image: "Array of file ATTACHMENTS: files the user uploaded in the chat, or files you created in your own file sandbox. Each item requires download_url and file_id, and may optionally include file_name and mime_type \u2014 the platform resolves a file passed here into these fields automatically, so just include the files. For plain image URLs the user pasted, use imageUrls instead. ALWAYS pass ALL attachments together in a single call \u2014 NEVER call this tool once per image. Do NOT use together with imageBase64.",
73275
73289
  imageUrls: "Array of publicly accessible image URLs (e.g. links the user pasted or URLs produced by other tools). Use this for plain URLs that are NOT chat attachments \u2014 no file_id is needed. ALWAYS pass ALL URLs together in a single call. Can be combined with image; do NOT use together with imageBase64.",
73276
73290
  imageBase64: 'Base64-encoded image data. Use when the client can read a file and encode it as base64. May include a data URL prefix (e.g. "data:image/jpeg;base64,...") or be raw base64. Do NOT use together with image.',
73277
73291
  mimeType: 'MIME type of the image (e.g. "image/jpeg", "image/png", "image/webp"). Required when imageBase64 does not include a data URL prefix.',
@@ -73675,7 +73689,17 @@ ${articleContent}${nextSteps}`;
73675
73689
  }
73676
73690
 
73677
73691
  // 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.";
73692
+ var START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS = {
73693
+ userRequest: "The user's request that led here, quoted if short, otherwise summarized in a sentence.",
73694
+ siteDescription: "What the site is: its purpose and who it is for. One or two sentences.",
73695
+ siteForm: "The form the site exists in right now (HTML/CSS/JS files, a static build, a zip, another builder's export, a design created in this conversation, or something else), roughly how many files, and whether it includes images.",
73696
+ 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.",
73697
+ agentIdentity: "Which agent or product you are and the harness you run in.",
73698
+ 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 \u2014 the user's login through this MCP, a CLI login, or none."
73699
+ };
73700
+ var START_DEPLOY_WEBSITE_PARAMS = Object.keys(
73701
+ START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS
73702
+ );
73679
73703
  var START_DEPLOY_WEBSITE_TOOL_NAME = "StartDeployWebsite";
73680
73704
  var START_DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
73681
73705
  var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
@@ -73701,7 +73725,12 @@ function addStartDeployWebsiteTool(server2, disableTools = [], toolDescriptions,
73701
73725
  START_DEPLOY_WEBSITE_TOOL_NAME,
73702
73726
  toolDescriptions?.[START_DEPLOY_WEBSITE_TOOL_NAME] ?? defaultToolDescriptions[START_DEPLOY_WEBSITE_TOOL_NAME],
73703
73727
  {
73704
- brief: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_BRIEF_DESCRIPTION)
73728
+ userRequest: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.userRequest),
73729
+ siteDescription: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.siteDescription),
73730
+ siteForm: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.siteForm),
73731
+ siteFunctionality: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.siteFunctionality),
73732
+ agentIdentity: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.agentIdentity),
73733
+ wixAccess: external_exports.string().min(1).describe(START_DEPLOY_WEBSITE_PARAM_DESCRIPTIONS.wixAccess)
73705
73734
  },
73706
73735
  { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
73707
73736
  async (_args, { httpClient }) => {
@@ -73926,7 +73955,7 @@ var addDocsTools = (server2, allowedTools = [
73926
73955
  const d = desc("SearchWixRESTDocumentation");
73927
73956
  return {
73928
73957
  searchTerm: external_exports.string().describe(d.searchTerm),
73929
- maxResults: external_exports.number().describe(d.maxResults).min(1).max(15).optional().default(15),
73958
+ maxResults: external_exports.number().describe(d.maxResults).min(1).max(17).optional().default(17),
73930
73959
  reason: external_exports.string().describe(d.reason)
73931
73960
  };
73932
73961
  })(),
@@ -73941,9 +73970,12 @@ var addDocsTools = (server2, allowedTools = [
73941
73970
  toolParams: {
73942
73971
  searchTerm
73943
73972
  },
73944
- maxResults: Math.max(1, Math.min(maxResults ?? 15, 15)),
73973
+ maxResults: Math.max(1, Math.min(maxResults ?? 17, 17)),
73945
73974
  linesInEachResult: 30,
73946
- usePlatformizedSearch
73975
+ usePlatformizedSearch,
73976
+ // Merge recipes/skills into the REST ranking — they live in a
73977
+ // separate corpus the REST document_type doesn't cover on its own.
73978
+ extraDocumentTypes: ["SKILLS"]
73947
73979
  });
73948
73980
  const grounding = result.includes(QUERY_CAPABILITY_MARKER) ? [
73949
73981
  REST_SEARCH_API_GROUNDING_REMINDER,
@@ -74206,7 +74238,7 @@ var addDocsTools = (server2, allowedTools = [
74206
74238
  const d = desc("SearchWixHeadlessDocumentation");
74207
74239
  return {
74208
74240
  searchTerm: external_exports.string().describe(d.searchTerm),
74209
- maxResults: external_exports.number().describe(d.maxResults).min(1).max(15).optional().default(15)
74241
+ maxResults: external_exports.number().describe(d.maxResults).min(1).max(17).optional().default(17)
74210
74242
  };
74211
74243
  })(),
74212
74244
  { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
@@ -74218,8 +74250,11 @@ var addDocsTools = (server2, allowedTools = [
74218
74250
  toolParams: {
74219
74251
  searchTerm
74220
74252
  },
74221
- maxResults: Math.max(1, Math.min(maxResults ?? 15, 15)),
74222
- usePlatformizedSearch
74253
+ maxResults: Math.max(1, Math.min(maxResults ?? 17, 17)),
74254
+ usePlatformizedSearch,
74255
+ // Merge recipes/skills into the headless ranking — same separate
74256
+ // corpus the WIX_HEADLESS document_type doesn't cover on its own.
74257
+ extraDocumentTypes: ["SKILLS"]
74223
74258
  });
74224
74259
  return {
74225
74260
  content: [