@wix/mcp 1.0.77 → 1.0.79

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.
@@ -72102,7 +72102,27 @@ function buildToolDescriptions(includeReadme) {
72102
72102
 
72103
72103
  Your code MUST be an \`async function()\` expression that returns a value.
72104
72104
 
72105
- Top-level verticals: business-solutions (stores, e-commerce, bookings, events, restaurants, pricing-plans, coupons), crm (contacts, members, loyalty-program, forms, community), business-management (payments, invoices, automations), assets (media, files), app-management (oauth, billing), account-level, site.
72105
+ Top-level verticals and their subcategories. This is a shallow orientation snapshot, NOT the full tree: every subcategory below contains many more resources, and each resource its methods — none of them listed here. Filter lightIndex by menuPath for the complete live tree:
72106
+ wix-apis
72107
+ ├── account-level
72108
+ │ └── accounts, ai-credits, b2b-site-management, domains, enterprise, resellers, sites, studio-workspace, user-management
72109
+ ├── app-management
72110
+ │ └── app-billing, app-extensions, app-installations, app-instance, app-permissions, app-tools, bi-event, companion-apps, embedded-scripts, market-listing, oauth-2, site-plugins
72111
+ ├── assets
72112
+ │ └── media, pro-gallery, rich-content
72113
+ ├── business-management
72114
+ │ └── ai-site-chat, analytics, app-installation, async-job, automations, branches, calendar, captcha, cookie-consent-policy, custom-embeds, dashboard, data-extension-schema, faq-app, functions, get-paid, google-business-profile, headless, locations, marketing, multilingual, notifications, online-programs, payments, secrets, seo, site-properties, site-search, site-urls, tags
72115
+ ├── business-solutions
72116
+ │ └── benefit-programs, blog, bookings, cms, coupons, donations, e-commerce, events, forum, gift-cards, meetings, portfolio, pricing-plans, restaurants, stores, suppliers-hub
72117
+ ├── crm
72118
+ │ └── communication, community, crm, forms, loyalty-program, members-contacts
72119
+ ├── mobile
72120
+ │ └── containers-app
72121
+ ├── site
72122
+ │ └── accessibility, viewer
72123
+ └── tools
72124
+ └── dynamic-site-context, semantic-search
72125
+ (each leaf above expands into resources → methods; explore via lightIndex, e.g. lightIndex.filter(r => r.menuPath[1] === "e-commerce"))
72106
72126
 
72107
72127
  Important schema guidance:
72108
72128
  - For ExecuteWixAPI, ALWAYS use \`method.publicUrl\`. It is the complete, executable \`https://www.wixapis.com/...\` URL for that method. When \`publicUrl\` is present, never build the execution URL by hand and never expose any other field as "the endpoint".
@@ -37616,7 +37616,27 @@ function buildToolDescriptions(includeReadme) {
37616
37616
 
37617
37617
  Your code MUST be an \`async function()\` expression that returns a value.
37618
37618
 
37619
- Top-level verticals: business-solutions (stores, e-commerce, bookings, events, restaurants, pricing-plans, coupons), crm (contacts, members, loyalty-program, forms, community), business-management (payments, invoices, automations), assets (media, files), app-management (oauth, billing), account-level, site.
37619
+ Top-level verticals and their subcategories. This is a shallow orientation snapshot, NOT the full tree: every subcategory below contains many more resources, and each resource its methods — none of them listed here. Filter lightIndex by menuPath for the complete live tree:
37620
+ wix-apis
37621
+ ├── account-level
37622
+ │ └── accounts, ai-credits, b2b-site-management, domains, enterprise, resellers, sites, studio-workspace, user-management
37623
+ ├── app-management
37624
+ │ └── app-billing, app-extensions, app-installations, app-instance, app-permissions, app-tools, bi-event, companion-apps, embedded-scripts, market-listing, oauth-2, site-plugins
37625
+ ├── assets
37626
+ │ └── media, pro-gallery, rich-content
37627
+ ├── business-management
37628
+ │ └── ai-site-chat, analytics, app-installation, async-job, automations, branches, calendar, captcha, cookie-consent-policy, custom-embeds, dashboard, data-extension-schema, faq-app, functions, get-paid, google-business-profile, headless, locations, marketing, multilingual, notifications, online-programs, payments, secrets, seo, site-properties, site-search, site-urls, tags
37629
+ ├── business-solutions
37630
+ │ └── benefit-programs, blog, bookings, cms, coupons, donations, e-commerce, events, forum, gift-cards, meetings, portfolio, pricing-plans, restaurants, stores, suppliers-hub
37631
+ ├── crm
37632
+ │ └── communication, community, crm, forms, loyalty-program, members-contacts
37633
+ ├── mobile
37634
+ │ └── containers-app
37635
+ ├── site
37636
+ │ └── accessibility, viewer
37637
+ └── tools
37638
+ └── dynamic-site-context, semantic-search
37639
+ (each leaf above expands into resources → methods; explore via lightIndex, e.g. lightIndex.filter(r => r.menuPath[1] === "e-commerce"))
37620
37640
 
37621
37641
  Important schema guidance:
37622
37642
  - For ExecuteWixAPI, ALWAYS use \`method.publicUrl\`. It is the complete, executable \`https://www.wixapis.com/...\` URL for that method. When \`publicUrl\` is present, never build the execution URL by hand and never expose any other field as "the endpoint".
@@ -51534,16 +51554,7 @@ async function addCodeModeTools(server, options) {
51534
51554
  toolDescriptions,
51535
51555
  maxResponseSize
51536
51556
  } = options;
51537
- if (!disableTools.includes(SEARCH_TOOL_NAME)) {
51538
- await addSearchTool(
51539
- server,
51540
- codeModeBaseUrl,
51541
- disableTools,
51542
- toolDescriptions,
51543
- maxResponseSize,
51544
- authStrategy
51545
- );
51546
- }
51557
+ addSearchCodeModeTool(server, options);
51547
51558
  if (!disableTools.includes(EXECUTE_TOOL_NAME) && authStrategy) {
51548
51559
  addExecuteCodeModeTool(server, {
51549
51560
  codeModeBaseUrl,
@@ -51594,69 +51605,6 @@ function addExecuteCodeModeTool(server, options) {
51594
51605
  maxResponseSize
51595
51606
  });
51596
51607
  }
51597
- var CATEGORY_TREE_CODE = `async function() {
51598
- const tree = {};
51599
- lightIndex.forEach(r => {
51600
- const top = r.menuPath[0];
51601
- const sub = r.menuPath[1];
51602
- if (!tree[top]) tree[top] = {};
51603
- if (sub) { if (!tree[top][sub]) tree[top][sub] = 0; tree[top][sub]++; }
51604
- });
51605
- return Object.entries(tree).map(([cat, subs]) => {
51606
- const total = Object.values(subs).reduce((a, b) => a + b, 0);
51607
- return cat + ' [' + total + ' resources]: ' + Object.keys(subs).join(', ');
51608
- }).join('\\n');
51609
- }`;
51610
- async function fetchCategoryTree(codeModeBaseUrl, authorization) {
51611
- try {
51612
- const resp = await fetch(`${codeModeBaseUrl}/api/code-mode/category-tree`, {
51613
- headers: authorization ? { Authorization: authorization } : {}
51614
- });
51615
- if (resp.ok) {
51616
- const data = await resp.json();
51617
- if (typeof data.result === "string") return data.result;
51618
- }
51619
- } catch {
51620
- }
51621
- return fetchCategoryTreeViaSearch(
51622
- `${codeModeBaseUrl}/api/code-mode/search`,
51623
- authorization
51624
- );
51625
- }
51626
- async function fetchCategoryTreeViaSearch(searchUrl, authorization) {
51627
- try {
51628
- const resp = await fetch(searchUrl, {
51629
- method: "POST",
51630
- headers: {
51631
- "Content-Type": "application/json",
51632
- ...authorization ? { Authorization: authorization } : {}
51633
- },
51634
- body: JSON.stringify({ code: CATEGORY_TREE_CODE })
51635
- });
51636
- if (!resp.ok) return null;
51637
- const data = await resp.json();
51638
- return typeof data.result === "string" ? data.result : null;
51639
- } catch {
51640
- return null;
51641
- }
51642
- }
51643
- async function addSearchTool(server, codeModeBaseUrl, _disableTools, toolDescriptions, maxResponseSize, authStrategy) {
51644
- let description = toolDescriptions?.[SEARCH_TOOL_NAME] ?? defaultToolDescriptions.SearchWixAPISpec;
51645
- const categoryTree = await fetchCategoryTree(
51646
- codeModeBaseUrl,
51647
- await resolveLoopbackAuthorization(authStrategy)
51648
- );
51649
- if (categoryTree) {
51650
- description = description.replace(/Top-level verticals:.*$/m, categoryTree);
51651
- }
51652
- registerSearchTool(
51653
- server,
51654
- codeModeBaseUrl,
51655
- description,
51656
- maxResponseSize,
51657
- authStrategy
51658
- );
51659
- }
51660
51608
  var SEARCH_MAX_RESPONSE_CHARS = 64e3;
51661
51609
  async function resolveLoopbackAuthorization(authStrategy) {
51662
51610
  try {
@@ -18200,7 +18200,27 @@ function buildToolDescriptions(includeReadme) {
18200
18200
 
18201
18201
  Your code MUST be an \`async function()\` expression that returns a value.
18202
18202
 
18203
- Top-level verticals: business-solutions (stores, e-commerce, bookings, events, restaurants, pricing-plans, coupons), crm (contacts, members, loyalty-program, forms, community), business-management (payments, invoices, automations), assets (media, files), app-management (oauth, billing), account-level, site.
18203
+ Top-level verticals and their subcategories. This is a shallow orientation snapshot, NOT the full tree: every subcategory below contains many more resources, and each resource its methods — none of them listed here. Filter lightIndex by menuPath for the complete live tree:
18204
+ wix-apis
18205
+ ├── account-level
18206
+ │ └── accounts, ai-credits, b2b-site-management, domains, enterprise, resellers, sites, studio-workspace, user-management
18207
+ ├── app-management
18208
+ │ └── app-billing, app-extensions, app-installations, app-instance, app-permissions, app-tools, bi-event, companion-apps, embedded-scripts, market-listing, oauth-2, site-plugins
18209
+ ├── assets
18210
+ │ └── media, pro-gallery, rich-content
18211
+ ├── business-management
18212
+ │ └── ai-site-chat, analytics, app-installation, async-job, automations, branches, calendar, captcha, cookie-consent-policy, custom-embeds, dashboard, data-extension-schema, faq-app, functions, get-paid, google-business-profile, headless, locations, marketing, multilingual, notifications, online-programs, payments, secrets, seo, site-properties, site-search, site-urls, tags
18213
+ ├── business-solutions
18214
+ │ └── benefit-programs, blog, bookings, cms, coupons, donations, e-commerce, events, forum, gift-cards, meetings, portfolio, pricing-plans, restaurants, stores, suppliers-hub
18215
+ ├── crm
18216
+ │ └── communication, community, crm, forms, loyalty-program, members-contacts
18217
+ ├── mobile
18218
+ │ └── containers-app
18219
+ ├── site
18220
+ │ └── accessibility, viewer
18221
+ └── tools
18222
+ └── dynamic-site-context, semantic-search
18223
+ (each leaf above expands into resources → methods; explore via lightIndex, e.g. lightIndex.filter(r => r.menuPath[1] === "e-commerce"))
18204
18224
 
18205
18225
  Important schema guidance:
18206
18226
  - For ExecuteWixAPI, ALWAYS use \`method.publicUrl\`. It is the complete, executable \`https://www.wixapis.com/...\` URL for that method. When \`publicUrl\` is present, never build the execution URL by hand and never expose any other field as "the endpoint".
@@ -19,10 +19,11 @@ export interface CodeModeOptions {
19
19
  export declare const EXECUTE_TOOL_NAME = "ExecuteWixAPI";
20
20
  export declare function addCodeModeTools(server: WixMcpServer, options: CodeModeOptions): Promise<void>;
21
21
  /**
22
- * Sync registration of SearchWixAPISpec without the optional
23
- * fetchCategoryTree description enrichment. Use this from sync entry points
24
- * such as createWixToolkit; use addCodeModeTools when you can await and want
25
- * the description enriched with the live top-level vertical tree.
22
+ * Register SearchWixAPISpec. The description must stay a byte-stable
23
+ * constant: tool descriptions sit at the head of consumers' LLM prompt-cache
24
+ * prefix, so any variance invalidates their entire cache. The verticals
25
+ * snapshot lives in default-config.ts; agents see the live tree via
26
+ * lightIndex.
26
27
  */
27
28
  export declare function addSearchCodeModeTool(server: WixMcpServer, options: CodeModeOptions): void;
28
29
  export declare function addExecuteCodeModeTool(server: WixMcpServer, options: CodeModeOptions): void;
@@ -10,9 +10,7 @@ const SEARCH_TOOL_NAME = 'SearchWixAPISpec';
10
10
  export const EXECUTE_TOOL_NAME = 'ExecuteWixAPI';
11
11
  export async function addCodeModeTools(server, options) {
12
12
  const { codeModeBaseUrl, authStrategy, disableTools = [], toolDescriptions, maxResponseSize } = options;
13
- if (!disableTools.includes(SEARCH_TOOL_NAME)) {
14
- await addSearchTool(server, codeModeBaseUrl, disableTools, toolDescriptions, maxResponseSize, authStrategy);
15
- }
13
+ addSearchCodeModeTool(server, options);
16
14
  if (!disableTools.includes(EXECUTE_TOOL_NAME) && authStrategy) {
17
15
  addExecuteCodeModeTool(server, {
18
16
  codeModeBaseUrl,
@@ -24,10 +22,11 @@ export async function addCodeModeTools(server, options) {
24
22
  }
25
23
  }
26
24
  /**
27
- * Sync registration of SearchWixAPISpec without the optional
28
- * fetchCategoryTree description enrichment. Use this from sync entry points
29
- * such as createWixToolkit; use addCodeModeTools when you can await and want
30
- * the description enriched with the live top-level vertical tree.
25
+ * Register SearchWixAPISpec. The description must stay a byte-stable
26
+ * constant: tool descriptions sit at the head of consumers' LLM prompt-cache
27
+ * prefix, so any variance invalidates their entire cache. The verticals
28
+ * snapshot lives in default-config.ts; agents see the live tree via
29
+ * lightIndex.
31
30
  */
32
31
  export function addSearchCodeModeTool(server, options) {
33
32
  const { codeModeBaseUrl, authStrategy, disableTools = [], toolDescriptions, maxResponseSize } = options;
@@ -51,67 +50,6 @@ export function addExecuteCodeModeTool(server, options) {
51
50
  maxResponseSize
52
51
  });
53
52
  }
54
- const CATEGORY_TREE_CODE = `async function() {
55
- const tree = {};
56
- lightIndex.forEach(r => {
57
- const top = r.menuPath[0];
58
- const sub = r.menuPath[1];
59
- if (!tree[top]) tree[top] = {};
60
- if (sub) { if (!tree[top][sub]) tree[top][sub] = 0; tree[top][sub]++; }
61
- });
62
- return Object.entries(tree).map(([cat, subs]) => {
63
- const total = Object.values(subs).reduce((a, b) => a + b, 0);
64
- return cat + ' [' + total + ' resources]: ' + Object.keys(subs).join(', ');
65
- }).join('\\n');
66
- }`;
67
- async function fetchCategoryTree(codeModeBaseUrl, authorization) {
68
- // Precomputed by the server's spec-sync cron. The legacy path below ran
69
- // CATEGORY_TREE_CODE in a Dynamic Worker on every tool registration —
70
- // one billable isolate per MCP session; keep it only as a fallback for
71
- // servers that predate the category-tree endpoint.
72
- try {
73
- const resp = await fetch(`${codeModeBaseUrl}/api/code-mode/category-tree`, {
74
- headers: authorization ? { Authorization: authorization } : {}
75
- });
76
- if (resp.ok) {
77
- const data = (await resp.json());
78
- if (typeof data.result === 'string')
79
- return data.result;
80
- }
81
- }
82
- catch {
83
- // fall through to the search-based fallback
84
- }
85
- return fetchCategoryTreeViaSearch(`${codeModeBaseUrl}/api/code-mode/search`, authorization);
86
- }
87
- async function fetchCategoryTreeViaSearch(searchUrl, authorization) {
88
- try {
89
- const resp = await fetch(searchUrl, {
90
- method: 'POST',
91
- headers: {
92
- 'Content-Type': 'application/json',
93
- ...(authorization ? { Authorization: authorization } : {})
94
- },
95
- body: JSON.stringify({ code: CATEGORY_TREE_CODE })
96
- });
97
- if (!resp.ok)
98
- return null;
99
- const data = (await resp.json());
100
- return typeof data.result === 'string' ? data.result : null;
101
- }
102
- catch {
103
- return null;
104
- }
105
- }
106
- async function addSearchTool(server, codeModeBaseUrl, _disableTools, toolDescriptions, maxResponseSize, authStrategy) {
107
- let description = toolDescriptions?.[SEARCH_TOOL_NAME] ??
108
- defaultToolDescriptions.SearchWixAPISpec;
109
- const categoryTree = await fetchCategoryTree(codeModeBaseUrl, await resolveLoopbackAuthorization(authStrategy));
110
- if (categoryTree) {
111
- description = description.replace(/Top-level verticals:.*$/m, categoryTree);
112
- }
113
- registerSearchTool(server, codeModeBaseUrl, description, maxResponseSize, authStrategy);
114
- }
115
53
  const SEARCH_MAX_RESPONSE_CHARS = 64_000;
116
54
  /**
117
55
  * Search needs no auth of its own; without a header the call is bucketed by the
@@ -542,7 +542,27 @@ export function buildToolDescriptions(includeReadme) {
542
542
 
543
543
  Your code MUST be an \`async function()\` expression that returns a value.
544
544
 
545
- Top-level verticals: business-solutions (stores, e-commerce, bookings, events, restaurants, pricing-plans, coupons), crm (contacts, members, loyalty-program, forms, community), business-management (payments, invoices, automations), assets (media, files), app-management (oauth, billing), account-level, site.
545
+ Top-level verticals and their subcategories. This is a shallow orientation snapshot, NOT the full tree: every subcategory below contains many more resources, and each resource its methods — none of them listed here. Filter lightIndex by menuPath for the complete live tree:
546
+ wix-apis
547
+ ├── account-level
548
+ │ └── accounts, ai-credits, b2b-site-management, domains, enterprise, resellers, sites, studio-workspace, user-management
549
+ ├── app-management
550
+ │ └── app-billing, app-extensions, app-installations, app-instance, app-permissions, app-tools, bi-event, companion-apps, embedded-scripts, market-listing, oauth-2, site-plugins
551
+ ├── assets
552
+ │ └── media, pro-gallery, rich-content
553
+ ├── business-management
554
+ │ └── ai-site-chat, analytics, app-installation, async-job, automations, branches, calendar, captcha, cookie-consent-policy, custom-embeds, dashboard, data-extension-schema, faq-app, functions, get-paid, google-business-profile, headless, locations, marketing, multilingual, notifications, online-programs, payments, secrets, seo, site-properties, site-search, site-urls, tags
555
+ ├── business-solutions
556
+ │ └── benefit-programs, blog, bookings, cms, coupons, donations, e-commerce, events, forum, gift-cards, meetings, portfolio, pricing-plans, restaurants, stores, suppliers-hub
557
+ ├── crm
558
+ │ └── communication, community, crm, forms, loyalty-program, members-contacts
559
+ ├── mobile
560
+ │ └── containers-app
561
+ ├── site
562
+ │ └── accessibility, viewer
563
+ └── tools
564
+ └── dynamic-site-context, semantic-search
565
+ (each leaf above expands into resources → methods; explore via lightIndex, e.g. lightIndex.filter(r => r.menuPath[1] === "e-commerce"))
546
566
 
547
567
  Important schema guidance:
548
568
  - For ExecuteWixAPI, ALWAYS use \`method.publicUrl\`. It is the complete, executable \`https://www.wixapis.com/...\` URL for that method. When \`publicUrl\` is present, never build the execution URL by hand and never expose any other field as "the endpoint".
@@ -31358,7 +31358,27 @@ function buildToolDescriptions(includeReadme) {
31358
31358
 
31359
31359
  Your code MUST be an \`async function()\` expression that returns a value.
31360
31360
 
31361
- Top-level verticals: business-solutions (stores, e-commerce, bookings, events, restaurants, pricing-plans, coupons), crm (contacts, members, loyalty-program, forms, community), business-management (payments, invoices, automations), assets (media, files), app-management (oauth, billing), account-level, site.
31361
+ Top-level verticals and their subcategories. This is a shallow orientation snapshot, NOT the full tree: every subcategory below contains many more resources, and each resource its methods — none of them listed here. Filter lightIndex by menuPath for the complete live tree:
31362
+ wix-apis
31363
+ ├── account-level
31364
+ │ └── accounts, ai-credits, b2b-site-management, domains, enterprise, resellers, sites, studio-workspace, user-management
31365
+ ├── app-management
31366
+ │ └── app-billing, app-extensions, app-installations, app-instance, app-permissions, app-tools, bi-event, companion-apps, embedded-scripts, market-listing, oauth-2, site-plugins
31367
+ ├── assets
31368
+ │ └── media, pro-gallery, rich-content
31369
+ ├── business-management
31370
+ │ └── ai-site-chat, analytics, app-installation, async-job, automations, branches, calendar, captcha, cookie-consent-policy, custom-embeds, dashboard, data-extension-schema, faq-app, functions, get-paid, google-business-profile, headless, locations, marketing, multilingual, notifications, online-programs, payments, secrets, seo, site-properties, site-search, site-urls, tags
31371
+ ├── business-solutions
31372
+ │ └── benefit-programs, blog, bookings, cms, coupons, donations, e-commerce, events, forum, gift-cards, meetings, portfolio, pricing-plans, restaurants, stores, suppliers-hub
31373
+ ├── crm
31374
+ │ └── communication, community, crm, forms, loyalty-program, members-contacts
31375
+ ├── mobile
31376
+ │ └── containers-app
31377
+ ├── site
31378
+ │ └── accessibility, viewer
31379
+ └── tools
31380
+ └── dynamic-site-context, semantic-search
31381
+ (each leaf above expands into resources → methods; explore via lightIndex, e.g. lightIndex.filter(r => r.menuPath[1] === "e-commerce"))
31362
31382
 
31363
31383
  Important schema guidance:
31364
31384
  - For ExecuteWixAPI, ALWAYS use \`method.publicUrl\`. It is the complete, executable \`https://www.wixapis.com/...\` URL for that method. When \`publicUrl\` is present, never build the execution URL by hand and never expose any other field as "the endpoint".
@@ -45330,16 +45350,7 @@ async function addCodeModeTools(server, options) {
45330
45350
  toolDescriptions,
45331
45351
  maxResponseSize
45332
45352
  } = options;
45333
- if (!disableTools.includes(SEARCH_TOOL_NAME)) {
45334
- await addSearchTool(
45335
- server,
45336
- codeModeBaseUrl,
45337
- disableTools,
45338
- toolDescriptions,
45339
- maxResponseSize,
45340
- authStrategy
45341
- );
45342
- }
45353
+ addSearchCodeModeTool(server, options);
45343
45354
  if (!disableTools.includes(EXECUTE_TOOL_NAME) && authStrategy) {
45344
45355
  addExecuteCodeModeTool(server, {
45345
45356
  codeModeBaseUrl,
@@ -45390,69 +45401,6 @@ function addExecuteCodeModeTool(server, options) {
45390
45401
  maxResponseSize
45391
45402
  });
45392
45403
  }
45393
- var CATEGORY_TREE_CODE = `async function() {
45394
- const tree = {};
45395
- lightIndex.forEach(r => {
45396
- const top = r.menuPath[0];
45397
- const sub = r.menuPath[1];
45398
- if (!tree[top]) tree[top] = {};
45399
- if (sub) { if (!tree[top][sub]) tree[top][sub] = 0; tree[top][sub]++; }
45400
- });
45401
- return Object.entries(tree).map(([cat, subs]) => {
45402
- const total = Object.values(subs).reduce((a, b) => a + b, 0);
45403
- return cat + ' [' + total + ' resources]: ' + Object.keys(subs).join(', ');
45404
- }).join('\\n');
45405
- }`;
45406
- async function fetchCategoryTree(codeModeBaseUrl, authorization3) {
45407
- try {
45408
- const resp = await fetch(`${codeModeBaseUrl}/api/code-mode/category-tree`, {
45409
- headers: authorization3 ? { Authorization: authorization3 } : {}
45410
- });
45411
- if (resp.ok) {
45412
- const data = await resp.json();
45413
- if (typeof data.result === "string") return data.result;
45414
- }
45415
- } catch {
45416
- }
45417
- return fetchCategoryTreeViaSearch(
45418
- `${codeModeBaseUrl}/api/code-mode/search`,
45419
- authorization3
45420
- );
45421
- }
45422
- async function fetchCategoryTreeViaSearch(searchUrl, authorization3) {
45423
- try {
45424
- const resp = await fetch(searchUrl, {
45425
- method: "POST",
45426
- headers: {
45427
- "Content-Type": "application/json",
45428
- ...authorization3 ? { Authorization: authorization3 } : {}
45429
- },
45430
- body: JSON.stringify({ code: CATEGORY_TREE_CODE })
45431
- });
45432
- if (!resp.ok) return null;
45433
- const data = await resp.json();
45434
- return typeof data.result === "string" ? data.result : null;
45435
- } catch {
45436
- return null;
45437
- }
45438
- }
45439
- async function addSearchTool(server, codeModeBaseUrl, _disableTools, toolDescriptions, maxResponseSize, authStrategy) {
45440
- let description = toolDescriptions?.[SEARCH_TOOL_NAME] ?? defaultToolDescriptions.SearchWixAPISpec;
45441
- const categoryTree = await fetchCategoryTree(
45442
- codeModeBaseUrl,
45443
- await resolveLoopbackAuthorization(authStrategy)
45444
- );
45445
- if (categoryTree) {
45446
- description = description.replace(/Top-level verticals:.*$/m, categoryTree);
45447
- }
45448
- registerSearchTool(
45449
- server,
45450
- codeModeBaseUrl,
45451
- description,
45452
- maxResponseSize,
45453
- authStrategy
45454
- );
45455
- }
45456
45404
  var SEARCH_MAX_RESPONSE_CHARS = 64e3;
45457
45405
  async function resolveLoopbackAuthorization(authStrategy) {
45458
45406
  try {
@@ -12627,7 +12627,27 @@ function buildToolDescriptions(includeReadme) {
12627
12627
 
12628
12628
  Your code MUST be an \`async function()\` expression that returns a value.
12629
12629
 
12630
- Top-level verticals: business-solutions (stores, e-commerce, bookings, events, restaurants, pricing-plans, coupons), crm (contacts, members, loyalty-program, forms, community), business-management (payments, invoices, automations), assets (media, files), app-management (oauth, billing), account-level, site.
12630
+ Top-level verticals and their subcategories. This is a shallow orientation snapshot, NOT the full tree: every subcategory below contains many more resources, and each resource its methods — none of them listed here. Filter lightIndex by menuPath for the complete live tree:
12631
+ wix-apis
12632
+ ├── account-level
12633
+ │ └── accounts, ai-credits, b2b-site-management, domains, enterprise, resellers, sites, studio-workspace, user-management
12634
+ ├── app-management
12635
+ │ └── app-billing, app-extensions, app-installations, app-instance, app-permissions, app-tools, bi-event, companion-apps, embedded-scripts, market-listing, oauth-2, site-plugins
12636
+ ├── assets
12637
+ │ └── media, pro-gallery, rich-content
12638
+ ├── business-management
12639
+ │ └── ai-site-chat, analytics, app-installation, async-job, automations, branches, calendar, captcha, cookie-consent-policy, custom-embeds, dashboard, data-extension-schema, faq-app, functions, get-paid, google-business-profile, headless, locations, marketing, multilingual, notifications, online-programs, payments, secrets, seo, site-properties, site-search, site-urls, tags
12640
+ ├── business-solutions
12641
+ │ └── benefit-programs, blog, bookings, cms, coupons, donations, e-commerce, events, forum, gift-cards, meetings, portfolio, pricing-plans, restaurants, stores, suppliers-hub
12642
+ ├── crm
12643
+ │ └── communication, community, crm, forms, loyalty-program, members-contacts
12644
+ ├── mobile
12645
+ │ └── containers-app
12646
+ ├── site
12647
+ │ └── accessibility, viewer
12648
+ └── tools
12649
+ └── dynamic-site-context, semantic-search
12650
+ (each leaf above expands into resources → methods; explore via lightIndex, e.g. lightIndex.filter(r => r.menuPath[1] === "e-commerce"))
12631
12651
 
12632
12652
  Important schema guidance:
12633
12653
  - For ExecuteWixAPI, ALWAYS use \`method.publicUrl\`. It is the complete, executable \`https://www.wixapis.com/...\` URL for that method. When \`publicUrl\` is present, never build the execution URL by hand and never expose any other field as "the endpoint".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/mcp",
3
- "version": "1.0.77",
3
+ "version": "1.0.79",
4
4
  "description": "A Model Context Protocol server for Wix AI tools",
5
5
  "bin": "./build/bin-standalone.js",
6
6
  "dependencies": {
@@ -96,16 +96,10 @@
96
96
  },
97
97
  "./package.json": "./package.json"
98
98
  },
99
- "typesVersions": {
100
- "*": {
101
- "toolkit": [
102
- "./build/dts/toolkit-entry.d.ts"
103
- ]
104
- }
105
- },
106
99
  "files": [
107
100
  "build",
108
101
  "!build/**/*.map",
102
+ "toolkit",
109
103
  "README.md"
110
104
  ],
111
105
  "main": "./build/cjs/index.cjs",
@@ -138,5 +132,5 @@
138
132
  ]
139
133
  }
140
134
  },
141
- "falconPackageHash": "7508a384f889ab41eeecd8970fc47f27470feb48def7722adc97ee79"
135
+ "falconPackageHash": "bf699454be45c048c0a432545cc0e1ed4c93776ed6812496455ea6f7"
142
136
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "//": "Directory stub for node10-style resolvers (tsc moduleResolution:'node', jest-resolve, legacy webpack) that ignore the root exports map. Modern resolvers consult exports first and never read this file. Keep the three targets in sync with the './toolkit' entry in ../package.json exports.",
3
+ "main": "../build/cjs/toolkit.cjs",
4
+ "module": "../build/esm/toolkit.js",
5
+ "types": "../build/dts/toolkit-entry.d.ts"
6
+ }