@wix/mcp 1.0.89 → 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.
@@ -71171,6 +71171,31 @@ var REST_PORTAL_ID = "d1972c09-74e2-4d36-a6f2-54e3310d4ad9";
71171
71171
  // src/docs/fetch-article.ts
71172
71172
  var RECIPES_INDEX_URL = "https://dev.wix.com/docs/api-reference/articles/ai-tools/wix-mcp/skills/wix-management-recipes-index";
71173
71173
  var DOCS_URL_PREFIX = "https://dev.wix.com/docs/";
71174
+ var SKILLS_REGISTRY_URL = new RegExp(
71175
+ "^https://(?:dev\\.wix\\.com(?:/docs)?|www\\.wix\\.com(?:/velo/reference)?)/skills(?:[/.?#]|$)"
71176
+ );
71177
+ function isSkillsRegistryUrl(url) {
71178
+ return SKILLS_REGISTRY_URL.test(url.trim());
71179
+ }
71180
+ async function fetchSkillsRegistryPage(httpClient, url) {
71181
+ let data;
71182
+ try {
71183
+ ({ data } = await httpClient.get(url, {
71184
+ headers: { accept: "text/markdown, text/plain;q=0.9, */*;q=0.1" }
71185
+ }));
71186
+ } catch (error2) {
71187
+ const { message, status } = getHttpErrorDetails(error2);
71188
+ const statusSuffix = status ? ` (status ${status})` : "";
71189
+ throw new Error(`${message}${statusSuffix}`);
71190
+ }
71191
+ if (typeof data !== "string") {
71192
+ return JSON.stringify(data, null, 2);
71193
+ }
71194
+ if (!data.trim()) {
71195
+ throw new Error("Article content is empty");
71196
+ }
71197
+ return data;
71198
+ }
71174
71199
  function getResponseErrorMessage(data) {
71175
71200
  if (!data) {
71176
71201
  return void 0;
@@ -71261,13 +71286,15 @@ async function fetchArticleContent(httpClient, articleUrl, mode, stripHeader = f
71261
71286
  `[fetch] Override failed for ${effectiveUrl}, falling back to ${articleUrl}:`,
71262
71287
  error2 instanceof Error ? error2.message : error2
71263
71288
  );
71264
- content = await fetchArticleContentFromDigor(
71289
+ content = isSkillsRegistryUrl(articleUrl) ? await fetchSkillsRegistryPage(httpClient, articleUrl) : await fetchArticleContentFromDigor(
71265
71290
  httpClient,
71266
71291
  articleUrl,
71267
71292
  mode,
71268
71293
  stripHeader
71269
71294
  );
71270
71295
  }
71296
+ } else if (isSkillsRegistryUrl(articleUrl)) {
71297
+ content = await fetchSkillsRegistryPage(httpClient, articleUrl);
71271
71298
  } else if (mode === "raw") {
71272
71299
  let parsedUrl;
71273
71300
  try {
@@ -71572,6 +71599,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
71572
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.",
71573
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.",
71574
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 StartDeployWebsite right away \u2014 not a site-creation tool, not the docs.",
71575
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."
71576
71604
  );
71577
71605
  }
@@ -71653,7 +71681,7 @@ var SITE_CREATION_COPY = {
71653
71681
  var SITE_GUIDANCE = dedent_default`
71654
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.
71655
71683
 
71656
- One case skips all of this: the user ALREADY HAS the finished site as files — hand-written HTML/CSS/JS, a zip, or the export of an AI builder. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool. For a full agentic flow, read the recipe first and publish the files yourself: https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md — it walks you through creating the site and uploading the files end to end. If you can't follow it, or it doesn't apply (you can't reach the file bytes, or something fails), fall back to sending the user to https://www.wix.com/headless/drop?utm_campaign=mcp — they drag the files in and get a live Wix-hosted site. Give that URL exactly as written, keeping the utm_campaign=mcp parameter.
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).
71657
71685
 
71658
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.
71659
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.
@@ -71911,6 +71939,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
71911
71939
  ReadFullDocsArticle: dedent_default`
71912
71940
  Fetches the full Wix docs article or method article with code examples for using the method.
71913
71941
  Docs articles looks like this: https://dev.wix.com/docs/... and they can either be general docs articles or method articles.
71942
+ 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.
71914
71943
  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.
71915
71944
  For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include ?apiView=SDK.
71916
71945
  ${reminder}
@@ -71918,7 +71947,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
71918
71947
  ReadFullDocsMethodSchema: dedent_default`
71919
71948
  Fetches the full method schema for a given method.
71920
71949
  This will give you the entire request/response schema with all the fields and their descriptions.
71921
- For REST API methods, prefer SearchWixAPISpec when it is available: it can fetch and inspect the exact method schema by docs URL, return the request/response shape, and inspect selected nested component schemas without dumping unrelated fields. Use ReadFullDocsMethodSchema for REST only when SearchWixAPISpec is unavailable or did not provide the needed detail.
71950
+ For REST and SDK API-reference methods, prefer SearchWixAPISpec when it is available: it can fetch and inspect the exact method schema by docs URL, return the request/response shape, the JavaScript SDK call (\`method.sdk\`: package, namespace, method, positional parameters, examples), and inspect selected nested component schemas without dumping unrelated fields. Use ReadFullDocsMethodSchema only when SearchWixAPISpec is unavailable or did not provide the needed detail.
71922
71951
  For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include ?apiView=SDK.
71923
71952
  ${reminder}
71924
71953
  `,
@@ -72044,7 +72073,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72044
72073
  `,
72045
72074
  "import-claude-design-from-url": dedent_default`
72046
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.
72047
- NOT for site files the user provides themselves (their own HTML/CSS/JS, a zip, another builder's export) — for those, don't call this tool. For a full agentic flow, read the recipe and publish the files yourself: https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md — it covers creating the site and uploading the files end to end. If you can't follow it, or it doesn't apply, fall back to sending the user to https://www.wix.com/headless/drop?utm_campaign=mcp, where they upload the files and get a live hosted site. Give that URL exactly as written, keeping the utm_campaign=mcp parameter.
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.
72048
72077
  `,
72049
72078
  RunWixCliCommand: dedent_default`
72050
72079
  Executes Wix CLI commands for Wix app development and management.
@@ -72073,6 +72102,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72073
72102
  `,
72074
72103
  SearchWixSDKDocumentation: dedent_default`
72075
72104
  Searches the Wix JavaScript SDK documentation.
72105
+ Next step for an API-reference method it returns: pass its docs URL (with or without \`?apiView=SDK\`) to \`SearchWixAPISpec\`'s \`getResourceSchemaByUrl\` when available, and read \`method.sdk\` for the exact import, call signature, typed parameters, return type, and examples.
72076
72106
  `,
72077
72107
  SearchBuildAppsDocumentation: dedent_default`
72078
72108
  Searches the Wix Build Apps documentation.
@@ -72085,18 +72115,18 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72085
72115
  SearchWixHeadlessDocumentation: dedent_default`
72086
72116
  Searches the Wix Headless documentation.
72087
72117
  `,
72088
- // Note: The raw schema also contains sdkData (JS SDK package name, namespace, and
72089
- // code examples) but it's intentionally omitted from the tool description. Currently
72090
- // this MCP is focused on REST API calls via ExecuteWixAPI. We may want to expose
72091
- // sdkData in the future — needs further thought on use cases and presentation.
72118
+ // Note: each method also carries its JavaScript SDK facet (`method.sdk`: package,
72119
+ // namespace, method name, positional signature, parameter schema, JS examples),
72120
+ // merged at spec-sync time from the docs' SDK view. REST fields are unchanged;
72121
+ // `sdk` is simply absent on methods the SDK docs don't list.
72092
72122
  SearchWixAPISpec: dedent_default`
72093
- Inspect the Wix REST API spec by writing JavaScript code that runs in a sandboxed read-only environment.
72094
- **Precondition:** you already have a method \`docsUrl\` — from \`SearchWixRESTDocumentation\`, \`BrowseWixRESTDocsMenu\`, \`ReadFullDocsArticle\`, ${includeReadme ? "a `WixREADME` recipe, " : ""}or a prior tool result / the user's message in this conversation. If you don't have one yet, call \`SearchWixRESTDocumentation\` FIRST to discover it; do not use this tool to search for or choose an endpoint.
72123
+ Inspect the Wix REST API spec, and the JavaScript SDK call for each method, by writing JavaScript code that runs in a sandboxed read-only environment.
72124
+ **Precondition:** you already have a method \`docsUrl\` — from \`SearchWixRESTDocumentation\`, \`SearchWixSDKDocumentation\` (its \`?apiView=SDK\` URLs work here as-is), \`BrowseWixRESTDocsMenu\`, \`ReadFullDocsArticle\`, ${includeReadme ? "a `WixREADME` recipe, " : ""}or a prior tool result / the user's message in this conversation. If you don't have one yet, call \`SearchWixRESTDocumentation\` (or \`SearchWixSDKDocumentation\` when writing SDK code) FIRST to discover it; do not use this tool to search for or choose an endpoint.
72095
72125
  **Never pass a \`docsUrl\` you produced from memory.** If the exact URL you are about to pass to \`getResourceSchemaByUrl\` did not appear verbatim in an earlier tool result (or the user's message), it is a guess — call \`SearchWixRESTDocumentation\` first and use a URL from its ranked results. A guessed URL that merely looks plausible routinely resolves to the WRONG sibling method (e.g. \`.../products-v3/create-product\` when the task needs \`.../products-v3/create-product-with-inventory\`), sending the whole turn down a dead end. When in doubt, discover — don't guess.
72096
- **This tool's job is to INSPECT the exact schema of a method you have ALREADY located — its request/response shape, nested types, and enums. It is NOT a discovery tool for choosing which method to use.**
72126
+ **This tool's job is to INSPECT the exact schema of a method you have ALREADY located — its request/response shape, nested types, and enums, and its SDK call (\`method.sdk\`). It is NOT a discovery tool for choosing which method to use.**
72097
72127
  With a method \`docsUrl\` in hand, call \`getResourceSchemaByUrl(methodDocsUrl)\` to get the resource schema, then read the target method from \`schema.methods\` and resolve any nested \`{ $circular: name }\` types via \`schema.components.schemas[name]\`.
72098
72128
  **If you don't already have a \`docsUrl\` in context, your FIRST action MUST be \`SearchWixRESTDocumentation\` (ranked semantic search) — not this tool.** Then pass the resulting \`docsUrl\` to \`getResourceSchemaByUrl\` here. Do NOT discover endpoints by hand-filtering or scanning \`lightIndex\` (e.g. \`lightIndex.filter(...)\` / \`lightIndex.flatMap(...)\` on a substring): it has no relevance ranking, matches only at resource-name granularity, and misses composite or method-level operations whose parent resource is named after a different noun than your intent. \`lightIndex\` is for resolving a \`docsUrl\` you already have, not for finding one.
72099
- Prefer \`SearchWixAPISpec\` over \`ReadFullDocsMethodSchema\` for REST method schemas when it is available, especially once you already have a docs URL from semantic search, menu browsing, or conversation context.
72129
+ Prefer \`SearchWixAPISpec\` over \`ReadFullDocsMethodSchema\` for REST and SDK method schemas when it is available, especially once you already have a docs URL from semantic search, menu browsing, or conversation context.
72100
72130
 
72101
72131
  Prefer URL-first results:
72102
72132
  - If you have a docs URL or partial docs URL, search \`resource.docsUrl\` and \`method.docsUrl\` first.
@@ -72104,7 +72134,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72104
72134
  - For API execution, return and use \`method.publicUrl\` when available. It is the preferred executable \`https://www.wixapis.com/...\` URL.
72105
72135
  - Return \`docsUrl\` for relevant resources/methods when the next step needs an article or API call source URL; do not hand off to \`ReadFullDocsMethodSchema\` just to inspect a REST method schema.
72106
72136
  - Use \`resourceId\` only as the internal handle for low-level loaders; prefer URL helpers when you have a docs URL.
72107
- - \`getResourceSchemaByUrl\` resolves only **API resource/method** docs (e.g. \`.../bookings/services/services-v2/create-service\`). It does NOT work on **skill** pages (\`.../skills/...\`) or **article** pages — those have no schema. For an article, use \`getArticleContentByUrl(docsUrl)\`. Never pass a \`.../skills/...\` URL (skill recipes often cross-link sibling skill pages) — use \`SearchWixRESTDocumentation\` to find the real API method instead. If a lookup misses, don't retry the same URL; rediscover it with \`SearchWixRESTDocumentation\`.
72137
+ - \`getResourceSchemaByUrl\` resolves only **API resource/method** docs (e.g. \`.../bookings/services/services-v2/create-service\`). It does NOT work on **skill** pages (\`.../skills/...\`) or **article** pages — those have no schema. For an article, use \`getArticleContentByUrl(docsUrl)\`. Never pass a \`.../skills/...\` URL (skill recipes often cross-link sibling skill pages) — read the skill page with \`ReadFullDocsArticle\`, and use \`SearchWixRESTDocumentation\` to find the real API method. If a lookup misses, don't retry the same URL; rediscover it with \`SearchWixRESTDocumentation\`.
72108
72138
 
72109
72139
  Your code has access to these globals:
72110
72140
 
@@ -72119,6 +72149,8 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72119
72149
  resourceId: string; // internal handle for getResourceSchema()
72120
72150
  docsUrl: string; // e.g. "https://dev.wix.com/docs/api-reference/.../<resource>"
72121
72151
  menuPath: string[]; // e.g. ["business-solutions", "<vertical>", "<resource>"]
72152
+ sdkPackage?: string; // JS SDK npm package shared by the resource's methods, e.g. "@wix/<vertical>"
72153
+ sdkNamespace?: string; // module exported by that package, e.g. "<resources>" — absent when the methods differ (then each method carries its own)
72122
72154
  methods: Array<{
72123
72155
  operationId: string; // e.g. "wix.<vertical>.v3.<Api>.<Operation>"
72124
72156
  summary: string; // human-readable method name
@@ -72128,6 +72160,9 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72128
72160
  publicUrl?: string; // preferred executable URL for ExecuteWixAPI, when available after spec sync
72129
72161
  publicBaseUrl?: string;
72130
72162
  description: string; // truncated to 200 chars
72163
+ sdk?: string; // the JS SDK call as the SDK docs show it, e.g. "query<Resources>(query, options)"; absent when the SDK docs don't list the method
72164
+ sdkPackage?: string; // only when the resource-level value is absent
72165
+ sdkNamespace?: string;
72131
72166
  }>;
72132
72167
  }
72133
72168
  \`\`\`
@@ -72156,8 +72191,17 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72156
72191
  legacyExamples: Array<{ // Curl examples
72157
72192
  content: { title: string; request: string; response: string };
72158
72193
  }>;
72194
+ sdk?: { // JavaScript SDK facet; absent when the SDK docs don't list the method
72195
+ package: string; // npm package, e.g. "@wix/<vertical>" → import { <namespace> } from "<package>"
72196
+ namespace: string; // module exported by the package, e.g. "<resources>"
72197
+ method: string; // SDK method name; NOT always the operation name (e.g. Data Items' InsertDataItem is "insert")
72198
+ signature: string[]; // positional parameter names in call order, e.g. ["query", "options"]
72199
+ requestBody: object | null; // same envelope as the REST requestBody; its properties ARE the parameters in \`signature\`, each typed
72200
+ responses?: object; // only when the SDK returns something other than the REST response (e.g. the created entity instead of a Create<X>Response wrapper)
72201
+ examples: Array<{ title: string; description?: string; code: string }>; // JavaScript examples from the SDK docs
72202
+ };
72159
72203
  }>;
72160
- components: { schemas: object };
72204
+ components: { schemas: object }; // REST types plus the SDK's own types; \`$circular\` names from either body resolve here, exactly as written (SDK-shaped copies of shared types are keyed "sdk:<TypeName>")
72161
72205
  }
72162
72206
  \`\`\`
72163
72207
 
@@ -72219,6 +72263,16 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72219
72263
  - When inspecting a specific method schema (i.e. you have found a single method and are returning its details), always include \`responses: method.responses\` alongside \`requestBody\`. Knowing the response shape up front prevents speculative re-runs of mutations just to see what the API returned.
72220
72264
  - Query/search methods: the declared map is \`method.queryMethodData.queryFieldsCapabilitiesMap\`, or \`method.searchMethodData.searchFieldsCapabilitiesMap\` on search methods. Each entry declares one field's allowed \`operators\` and \`sort\` directions — a closed list, valid for that method alone, so another endpoint's map or a field's presence in the response proves nothing here. Each listed operator is valid on its own — a field takes one — so combine conditions with the logical operators instead: \`$and\` and \`$or\` take an array of expressions, \`$not\` takes one, and they can nest. They are WQL syntax rather than a field capability, so they never appear in the map, and its silence about them is no restriction. An undeclared field or unlisted operator are rejected; some endpoints instead ignore the filter or sort and return the wrong rows. \`sort: []\` means not sortable; no map means nothing is declared, so try what you need and filter in code if it isn't supported.
72221
72265
 
72266
+ JavaScript SDK (writing code with \`@wix/sdk\` and the \`@wix/*\` packages, in Wix Headless, Velo, CLI apps, or any Node/browser project):
72267
+ - Read \`method.sdk\`, not the REST fields. The REST \`requestBody\` is the wire shape; the SDK wraps it differently — fields become positional arguments, and secondary fields move into an \`options\` object — so never derive an SDK call from the REST body. \`sdk.requestBody.properties\` are the parameters, in the order given by \`sdk.signature\`; \`sdk.requestBody.required\` says which are mandatory.
72268
+ - The call is \`<namespace>.<method>(<signature>)\` after \`import { <namespace> } from "<package>"\` (e.g. \`import { services } from "@wix/bookings"\`), or \`wixClient.<namespace>.<method>(...)\` on a client created with \`createClient({ modules: { <namespace> } })\`. \`sdk.method\` is the only reliable method name — it is not always the camelCased operation name.
72269
+ - Return value: \`await\` resolves to \`sdk.responses\` when present, otherwise to the same shape as \`method.responses\`. Resolve \`$circular\` names from either body against \`schema.components.schemas\` exactly as written: an SDK body may point at an SDK-shaped copy of a type, keyed \`"sdk:<TypeName>"\` (e.g. \`sdk:wix.bookings.services.v2.Service\`), which sits in the same dictionary.
72270
+ - Field names differ from REST on entity system fields: the SDK reads and writes \`_id\`, \`_createdDate\`, \`_updatedDate\` where REST has \`id\`, \`createdDate\`, \`updatedDate\`. The SDK-shaped types already use the SDK names — take field names from them, never from the REST body or a REST-keyed type.
72271
+ - Timestamps: where a REST field is a \`date-time\` string, the SDK takes and returns a JavaScript \`Date\` object (the SDK types spell this \`type: "Date"\`).
72272
+ - \`sdk.examples[].code\` are the SDK docs' JavaScript examples; prefer adapting one over composing a call from the schema. Query methods use the same WQL \`filter\`/\`sort\` rules and the same \`queryMethodData\` map as REST.
72273
+ - No \`method.sdk\` means the SDK docs don't list that method: say so and offer the REST call instead of guessing an SDK signature. Where the method is listed, \`lightIndex\` carries the same call compactly as \`method.sdk\` (a string), with the package and namespace on the resource.
72274
+ - For ExecuteWixAPI, keep using \`method.publicUrl\` and the REST \`requestBody\`; the SDK facet is for code the user will run, not for calls made through this MCP.
72275
+
72222
72276
  Examples:
72223
72277
 
72224
72278
  Inspect one method schema by exact docs URL:
@@ -72263,6 +72317,39 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72263
72317
  }
72264
72318
  \`\`\`
72265
72319
 
72320
+ Get the JavaScript SDK call for a method — import, signature, typed parameters, return type, and a docs example (the docs URL may come from \`SearchWixSDKDocumentation\`, with or without \`?apiView=SDK\`):
72321
+ \`\`\`javascript
72322
+ async function() {
72323
+ const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products?apiView=SDK";
72324
+
72325
+ const schema = await getResourceSchemaByUrl(methodUrl);
72326
+ const method = schema.methods.find(method => method.docsUrl === methodUrl.replace(/\\?.*$/, ""));
72327
+ if (!method) return { message: "No exact method URL match", methods: schema.methods.map(m => ({ title: m.summary, docsUrl: m.docsUrl, sdk: m.sdk && m.sdk.method })) };
72328
+ if (!method.sdk) return { message: "The SDK docs do not list this method; use the REST call.", publicUrl: method.publicUrl, requestBody: method.requestBody };
72329
+
72330
+ const { sdk } = method;
72331
+ const types = schema.components.schemas;
72332
+ // Each positional parameter, typed. The parameters body is pre-expanded for a method URL;
72333
+ // any remaining { $circular: name } resolves against types[name].
72334
+ const paramsSchema = sdk.requestBody?.content?.["application/json"]?.schema ?? {};
72335
+ const parameters = sdk.signature.map(name => ({
72336
+ name,
72337
+ required: (paramsSchema.required ?? []).includes(name),
72338
+ schema: paramsSchema.properties?.[name]
72339
+ }));
72340
+
72341
+ return {
72342
+ import: \`import { \${sdk.namespace} } from "\${sdk.package}";\`,
72343
+ call: \`\${sdk.namespace}.\${sdk.method}(\${sdk.signature.join(", ")})\`,
72344
+ parameters,
72345
+ returns: sdk.responses ?? method.responses,
72346
+ // Query methods: the same closed list of filterable/sortable fields applies to the SDK call.
72347
+ queryFieldsCapabilities: method.queryMethodData?.queryFieldsCapabilitiesMap,
72348
+ example: sdk.examples[0]
72349
+ };
72350
+ }
72351
+ \`\`\`
72352
+
72266
72353
  Inspect one resource by resource docs URL:
72267
72354
  \`\`\`javascript
72268
72355
  async function() {
@@ -72467,11 +72554,18 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
72467
72554
  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.
72468
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.
72469
72556
  Set \`hasMutations: true\` for any document containing a mutation root field.
72557
+ `,
72558
+ 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.
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).
72562
+ Returns the full recipe; follow it and run the flow yourself. The drop page is only the fallback when you can't.
72563
+ 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).
72470
72564
  `,
72471
72565
  CreateWixBusinessGuide: dedent_default`
72472
72566
  Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
72473
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\`.
72474
- Exception, even when the user says "headless": if they ALREADY HAVE the finished site as files (their own HTML/CSS/JS, a zip, an AI-builder export) and want those files hosted, don't call this tool. For a full agentic flow, read the recipe and publish the files yourself: https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md — it covers creating the site and uploading the files end to end. If you can't follow it, or it doesn't apply, fall back to sending the user to https://www.wix.com/headless/drop?utm_campaign=mcp to upload the files and get a live hosted site (give that URL exactly, keeping the utm_campaign=mcp parameter). This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
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.
72475
72569
 
72476
72570
  ## What This Tool Contains
72477
72571
 
@@ -73161,7 +73255,7 @@ var paramDescriptions = {
73161
73255
  reason: "One sentence describing the original user request and the task you are trying to accomplish with this search."
73162
73256
  },
73163
73257
  ReadFullDocsArticle: {
73164
- articleUrl: "The URL of the docs article or method article to fetch. Should be something like https://dev.wix.com/docs/.../... 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)."
73258
+ articleUrl: "The URL of the docs article or method article to fetch. Should be something like https://dev.wix.com/docs/.../... 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). Wix skills pages (https://www.wix.com/skills/..., https://dev.wix.com/docs/skills/...) are read as-is, including their referenced files."
73165
73259
  },
73166
73260
  ReadFullDocsMethodSchema: {
73167
73261
  articleUrl: "The URL of the documentation to fetch. Should be something like https://dev.wix.com/docs/.../... 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).",
@@ -73580,6 +73674,62 @@ ${articleContent}${nextSteps}`;
73580
73674
  );
73581
73675
  }
73582
73676
 
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";
73681
+ var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
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.`;
73683
+ function startDeployWebsiteResponse(recipe) {
73684
+ return [
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.`,
73686
+ FALLBACK_LINE,
73687
+ "---",
73688
+ recipe.trim()
73689
+ ].join("\n\n");
73690
+ }
73691
+ var START_DEPLOY_WEBSITE_POINTER_RESPONSE = [
73692
+ `Read and follow this recipe end to end: ${START_DEPLOY_WEBSITE_RECIPE_URL}`,
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.",
73694
+ FALLBACK_LINE
73695
+ ].join("\n\n");
73696
+ function addStartDeployWebsiteTool(server2, disableTools = [], toolDescriptions, fetchOptions = {}) {
73697
+ if (disableTools.includes(START_DEPLOY_WEBSITE_TOOL_NAME)) {
73698
+ return;
73699
+ }
73700
+ server2.tool(
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
+ },
73706
+ { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
73707
+ async (_args, { httpClient }) => {
73708
+ let text = START_DEPLOY_WEBSITE_POINTER_RESPONSE;
73709
+ try {
73710
+ const recipe = await fetchArticleContent(
73711
+ httpClient,
73712
+ START_DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ""),
73713
+ "article",
73714
+ true,
73715
+ fetchOptions.skillsPortalUrl,
73716
+ fetchOptions.repo,
73717
+ fetchOptions.commitHash
73718
+ );
73719
+ if (recipe && recipe.trim()) {
73720
+ text = startDeployWebsiteResponse(recipe);
73721
+ }
73722
+ } catch (error2) {
73723
+ console.warn(
73724
+ `[StartDeployWebsite] recipe fetch failed, returning the pointer:`,
73725
+ error2 instanceof Error ? error2.message : error2
73726
+ );
73727
+ }
73728
+ return { content: [{ type: "text", text }] };
73729
+ }
73730
+ );
73731
+ }
73732
+
73583
73733
  // src/docs/docs.ts
73584
73734
  var VALID_DOCS_TOOLS = [
73585
73735
  "WDS",
@@ -73639,6 +73789,7 @@ var addDocsTools = (server2, allowedTools = [
73639
73789
  const {
73640
73790
  getToKnowWixEnabled = false,
73641
73791
  createWixBusinessGuideEnabled = true,
73792
+ startDeployWebsiteEnabled = true,
73642
73793
  disableTools,
73643
73794
  toolDescriptions,
73644
73795
  readmeDocs,
@@ -73704,6 +73855,13 @@ var addDocsTools = (server2, allowedTools = [
73704
73855
  cliEnabled
73705
73856
  );
73706
73857
  }
73858
+ if (startDeployWebsiteEnabled) {
73859
+ addStartDeployWebsiteTool(server2, disableTools || [], toolDescriptions, {
73860
+ skillsPortalUrl,
73861
+ repo: effectiveRepo,
73862
+ commitHash: effectiveCommitHash
73863
+ });
73864
+ }
73707
73865
  if (allowedTools.includes("WDS") && !disableTools?.includes("SearchWixWDSDocumentation")) {
73708
73866
  server2.tool(
73709
73867
  "SearchWixWDSDocumentation",
@@ -74220,18 +74378,19 @@ var addDocsTools = (server2, allowedTools = [
74220
74378
  async ({ articleUrl }, { httpClient }) => {
74221
74379
  const validPrefixes = ["https://dev.wix.com/docs/"];
74222
74380
  if (skillsPortalUrl) validPrefixes.push(skillsPortalUrl);
74223
- if (!validPrefixes.some((p) => articleUrl.startsWith(p))) {
74381
+ const isSkillsPage = isSkillsRegistryUrl(articleUrl);
74382
+ if (!isSkillsPage && !validPrefixes.some((p) => articleUrl.startsWith(p))) {
74224
74383
  return {
74225
74384
  isError: true,
74226
74385
  content: [
74227
74386
  {
74228
74387
  type: "text",
74229
- text: `Invalid article URL: must start with https://dev.wix.com/docs/. Got: "${articleUrl}"`
74388
+ 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}"`
74230
74389
  }
74231
74390
  ]
74232
74391
  };
74233
74392
  }
74234
- if (articleUrl.startsWith("https://dev.wix.com/docs/")) {
74393
+ if (!isSkillsPage && articleUrl.startsWith("https://dev.wix.com/docs/")) {
74235
74394
  articleUrl = articleUrl.replace(/\.md$/, "");
74236
74395
  }
74237
74396
  try {